home directory

Michael Schwendt mschwendt at gmail.com
Fri Dec 19 16:40:48 UTC 2008


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




More information about the fedora-list mailing list