"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 again. >> >
[...] >sed and grep can help. > >echo $PATH | grep 'SOMEPATH' >if [ $? == 0 ];then > export PATH >else > PATH=NEWPATH >fi > >Check the login on that though, shouldnt be too hard. Great! Sorry about the double post: kmail did what I said not what I meant.