[wplug] PATH problem with Bash

Tom Rhodes trhodes at FreeBSD.org
Wed Mar 19 18:21:07 EST 2008


On Wed, 19 Mar 2008 17:47:45 -0400
Zach <netrek at gmail.com> wrote:

> On Wed, Mar 19, 2008 at 9:35 AM, Gary Morrow <gary.morrow at ansys.com> wrote:
> >
> >  Have you checked to make sure you are actually using bash?
> 
> Yes.
> 
> chaos at tellurium:~$ echo $SHELL
> /bin/bash

Have you tried unquoting it?

[user at xxx ~]$ mkdir ~/blah
[user at xxx ~]$ ls blah
[user at xxx ~]$ pwd
/home/user
[user at xxx ~]$ export PATH=$PATH:/home/user/blah
[user at xxx ~]$ echo $PATH
/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/user/bin:/home/user/blah


[user at xxx ~]$ vi .bashrc
... Added this:

# set PATH so it includes user's private bin if it exists
if [ -d ${HOME}/blah ] ; then
    export PATH=${HOME}/blah:${PATH}
fi

[user at xxx ~]$ source .bashrc 
[user at xxx ~]$ echo $PATH
/home/user/blah:/usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/user/bin:/home/user/blah

Works for me, note I used YOUR if block with the only change being
to remove the quotes and blah instead of bin.

-- 
Tom Rhodes


More information about the wplug mailing list