How to use different --workdir for different hosts in GNU parallel

Viewed 167

I want to execute my script.sh on local machine and on remote machine. However, on local machine the script.sh file is inside ~/dir1/and on remote machine is inside /dir2.

What I tried was: inside ~/dir1/on local machine I run:

  parallel --workdir /dir2 -S remotemachine -S : ./script.sh ::: someargs

On remote machine runs fine, but on local machine parallel also tries to run script.sh inside /dir2

1 Answers
Related