[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: home directory



On Fri, 19 Dec 2008 15:57:33 +0000, Alan wrote:

> On Fri, 19 Dec 2008 16:51:08 +0100
> "Adel ESSAFI" wrote:
> 
> > >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > >> Hash: SHA1
> > >>
> > >> Adel ESSAFI wrote:
> > >>
> > >> > Can tou help me to solve this problem
> > >>
> > >> try '~/$user'.
> > >
> > >
> > > No, it does not work
> > 
> > In a scrit shell, I have a variable user which will take all users values
> 
> There is probably a proper way to do this but the following ugly hack
> also works
> 
> DIRECTORY=$(echo "echo ~"$USERNAME | sh)

DIRECTORY=$(eval echo ~$user)
echo $DIRECTORY


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]