[NTLUG:Discuss] $PATH=what??!
Kevin Brannen
kbrannen at gte.net
Sat Nov 20 10:24:16 CST 1999
Cameron wrote:
>
>
> thanks for pointing that out to me. i hate it when it's something like
> that; i should have noticed that. anyway, for those interested here's
> the revised command that was making me crazy earlier:
>
> $ ssh bravo2 "set ; echo \$PATH ; set"
>
> BUT (and if i could make that but bigger i would) my main problem still
> remains. how can i change the default path for my system (or just
> bash)? it defaults to "/usr/bin:/bin:/usr/local/bin". i've about
> decided it's set in the bash binary because i can't find it anywhere.
> any more pointers would be greatly appreciated. thnx
> --
Actually, the path is set in /etc/profile; at least for regular shells,
ssh may have its own equivalent (I haven't used it). Nevertheless, I
seem to recall your first email had one solution in it. Personally, I'd
do something like:
$ ssh bravo2 'PATH=whatever command'
just like you can do on your local system. BUT :-) unless that command
executes multiple sub-commands, why do you even need to set the PATH?
If it's just a single command, AND you know where it is, just execute it
by giving its full path.
HTH,
Kevin
More information about the Discuss
mailing list