[NTLUG:Discuss] $PATH=what??!

Cameron hrothgar at endor.hsutx.edu
Sat Nov 20 00:03:40 CST 1999


i've got a problem that's bugging the pooh out of me.  i'm trying to run
a remote command with ssh that it NOT is the systems default $PATH.
here's what i've found so far ("/snip" means i cut some stuff out):

  $ ssh bravo2 wipe
  bash: wipe: command not found

  $ ssh bravo2 set
  (/snip)
  PATH=/usr/bin:/bin:/usr/local/bin
  SHELL=/bin/bash

  $ ssh bravo2 echo $PATH
  /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/lam-6.3/bin

  $ ssh bravo2 "export PATH=/usr/local/lam-6.3/bin ; set"
  (/snip)
  PATH=/usr/local/lam-6.3/bin

  $ ssh bravo2 "export PATH=/usr/local/lam-6.3/bin ; wipe"
  (wipe executes here)

  $ ssh bravo2 "set ; echo $PATH ; set"
  (/snip)
  PATH=/usr/bin:/bin:/usr/local/bin
  (/snip)
  /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/lam-6.3/bin
  (/snip)
  PATH=/usr/bin:/bin:/usr/local/bin

you'll notice that `set` and `echo $PATH` yield different values no
matter how you turn it.  the context in which i need to do this (using
LAM/MPI) doesn't make the "export..." stuff very appealing.  and that
last command really confuses the heck out of me.  anyway, to the heart
of my problem:  where can i set the default, system-wide,
shell-independent(?) $PATH?  i'm running Mandrake 6.1.  i've looked
through /etc/rc.d/ but no luck.  btw, in /etc/profile the path gets set
to "$PATH:/usr/X11R6/bin", so i know it's not effecting anything.

well, bash gurus...it's time to step forward.  i'm at my wits end.  any
help would be greatly appreciated.  TIA
-- 
cameron
  [ Grow up and use mutt (http://www.mutt.org) ]




More information about the Discuss mailing list