On 04/16/2012 01:20 PM, Tim Mooney wrote:
> PATH is important enough that I want it set
> (correctly!) all the time.  The quintessential example of this is with
> 
>     ssh somehost some_obscure_command

When I've been in that situation I've
put something like this into .bashrc:

desired_PATH=/home/eggert/bin:/r/share1/bin:/usr/bin:...etc...
case :$PATH: in
*:"$desired_PATH":*) ;;
*) PATH=$desired_PATH ;;
esac

That way, if some other program prepends or appends
something to $PATH, my subshells respect that; but
if bash is being invoked de novo it uses the desired PATH.

Maybe you can use that idea.



Reply via email to