Stupid bash scripting question

Kevin D. Clark clark_k at pannaway.com
Wed Aug 24 10:07:00 EDT 2005


Cole Tuininga writes:

> In other words, if I have something like:
>
> user="username"
> f="~${user}"
>
> I'd like $f to end up with the path to username's actual home.  As it
> is, it just has the value "~username".  What magic do I need to do on my
> f assignment line?!

user=username
f=`eval echo ~$user`

--kevin
-- 
GnuPG ID: B280F24E                     And the madness of the crowd
alumni.unh.edu!kdc                     Is an epileptic fit
                                       -- Tom Waits



More information about the gnhlug-discuss mailing list