I have two shell scripts; let's call those script1 and script2.
Within script1 I invoke script2. When I call script1 from my local terminal it work fine, but when I launch this command by ssh like this:
plink.exe -ssh hostname -l user -pw password "path to script1/script1"
I get this error:
script2 not found.
Now I can put an absolute path inside script1 to call script2, but the problem is that script2 calls other scripts and so on...
Can I avoid ssh look for a command from root?