I have a script that needs to run a remote script over ssh on a different box, and the remote script is in some directory other than the home dir. The remote script is a ksh shell script that calls other scripts in its own directory.
Since the remote script is being called with its path, it doesn't execute from within that directory and therefore can't find the other scripts there. Does anyone know how I'd do such a thing? Here are various command-line thingies I've tried, assuming brett-test1 is the remote script and brett-test2 is another script in the remote script's directory, and that each script just spits out "from script_name": [EMAIL PROTECTED] ssh remote_host /pth/bin/brett-test1 from brett-test1 /pth/bin/brett-test1[4]: brett-test2: not found. [EMAIL PROTECTED] [EMAIL PROTECTED] ssh remote_host PWD=/pth/bin brett-test1 ksh: brett-test1: not found. [EMAIL PROTECTED] [EMAIL PROTECTED] ssh remote_host "export PWD=/pth/bin brett-test1" ksh: brett-test1: This is not an identifier. [EMAIL PROTECTED] [EMAIL PROTECTED] ssh remote_host "export PWD=/pth/bin; brett-test1" ksh: brett-test1: not found. [EMAIL PROTECTED] [EMAIL PROTECTED] ssh remote_host "export PWD=/pth/bin; ./brett-test1" ksh: ./brett-test1: not found. [EMAIL PROTECTED] ssh remote_host "export PWD=/pth/bin; pwd" /home/brett [EMAIL PROTECTED] ssh remote_host "cd=/pth/bin; pwd" /home/brett [EMAIL PROTECTED] ssh remote_host "cd /pth/bin; pwd" /pth/bin [EMAIL PROTECTED] ssh remote_host "cd /pth/bin; ./brett-test1" from brett-test1 ./brett-test1[4]: brett-test2: not found. [EMAIL PROTECTED] [EMAIL PROTECTED] ssh remote_host "PWD=/pth/bin brett-test1" ksh: brett-test1: not found. Thanks, Brett /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
