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 PATH fi The questions are: Is this the way one guards against multiple additions in subshells? Is there a way to check for a substring? - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs