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

Re: Odd "which" behaviour - not finding shell script



Jonathan Matthews said:
> Here's a transcript from a shell session.

> jaycee@bigdaddy:~$ echo $PATH
> ~/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> jaycee@bigdaddy:~$ ls ~/bin


just a guess but I say your problem is there. The shell did not
expand the ~ when setting the path.

on my debian system running bash:

aphro@defiant:~$ set | grep PATH
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/aphro/bin
_=PATH
aphro@defiant:~$ export PATH=~/bin:$PATH
aphro@defiant:~$ set | grep PATH
PATH=/home/aphro/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/aphro/bin
_=PATH

the ~ was expanded ....maybe you could try $HOME instead of ~ that
may be more compadible accross shells.

nate





Reply to: