I'm trying to use GNU Parallel in order to run a script with several parameters on a remote machines. This looks somewhat like:
parallel --onall -S remote-machine /shared/location/script.sh ::: param_a param_b
/shared/location/script.sh is using git. So I get this error:
git: command not found
If I log in to remote-machine manually and run /shared/location/script.sh with param_a or param_b everything works fine. So I checked the $PATH variable and found out that if I run something on remote-machine using GNU parallel, it looks like PATH=/usr/bin:/bin:/usr/sbin:/sbin. If I run it directly from the machine it has also /local/bin/git.
Why is it that way and how to overcome?
Thanks in advance