> how can i add a path (like "." or "/Users/Shared/bin") to the $PATH
> environment var only when its not yet in there?
> the nicest would be something where i can give the two new paths in one
> string as input (eg. ".:/Users/Shared/bin") and $PATH as another input.
One possibility (with no error checking):
case :$1: in
*) PATH=$PATH:$2; export PATH
addToPath $1 $2
Of course, this would have to be sourced rather than run as a command
to affect the calling process.
Everyone in this room is wearing a uniform, and don't kid yourself.
- Frank Zappa