Re: Adding to the PATH but not if already in $PATH

2005-02-26 Thread chuck gelm
Dog Walker wrote: I want to prepend a directory to my PATH in my $HOME/.bashrc and export the result. But I only want it to happen once: iow, if a directory I want prepended is already in the PATH, do not prepend it again. Something like: if "/home/dw/bin" not in $PATH ; then PATH=/home/dw

Re: Adding to the PATH but not if already in $PATH

2005-02-26 Thread Eric Bambach
On Saturday 26 February 2005 01:40 pm, you wrote: > "Eric Bambach" <[EMAIL PROTECTED]> said: > >On Saturday 26 February 2005 12:17 pm, you wrote: > >> I want to prepend a directory to my PATH in my $HOME/.bashrc and export > >> the result. But I only want it to happen once: iow, if a directory I >

Re: Adding to the PATH but not if already in $PATH

2005-02-26 Thread DogWalker
"Eric Bambach" <[EMAIL PROTECTED]> said: >On Saturday 26 February 2005 12:17 pm, you wrote: >> I want to prepend a directory to my PATH in my $HOME/.bashrc and export the >> result. But I only want it to happen once: iow, if a directory I want >> prepended is already in the PATH, do not prepend it

Re: Adding to the PATH but not if already in $PATH

2005-02-26 Thread Eric Bambach
On Saturday 26 February 2005 12:17 pm, you wrote: > I want to prepend a directory to my PATH in my $HOME/.bashrc and export the > result. But I only want it to happen once: iow, if a directory I want > prepended is already in the PATH, do not prepend it again. > > Something like: > >if "/home/d

Adding to the PATH but not if already in $PATH

2005-02-26 Thread Dog Walker
I want to prepend a directory to my PATH in my $HOME/.bashrc and export the result. But I only want it to happen once: iow, if a directory I want prepended is already in the PATH, do not prepend it again. Something like: if "/home/dw/bin" not in $PATH ; then PATH=/home/dw:$PATH export

Adding to the PATH but not if already in $PATH

2005-02-26 Thread Dog Walker
I want to prepend a directory to my PATH in my $HOME/.bashrc and export the result. But I only want it to happen once: iow, if a directory I want prepended is already in the PATH, do not prepend it again. Something like: if "/home/dw/bin" not in $PATH ; then PATH=/home/dw:$PATH export