New answers tagged remote
Variables are not expanded in single quotes, which is how you are passing the commands in the first instance. As such, in the first case, the shell on the remote end never receives your values, it just receives literal $1 and $2, and they do not exist, so they expand to nothing. $ var=foo $ echo '$var' $var $ echo "$var" foo pscp therefore gets no values ...
Does the screenshot command import -window root desktop.jpg work?
The simplest solution is to use relative pathnames. E.g., myExecutable ../fileloc/filename.txt will mean the same on both systems. Of course this syntax requires that the current directory of the invoking script (the script that contains the above line) should be on the same Windows drive letter as the filename. If not, I would just adopt solution 2: A ...
Top 50 recent answers are included