Ahh, but Sir, I think thou did not test it. Otherwise thou would have written differently.
90 karma · joined August 14, 2013
To make the emulation easier, make a simple alias:
alias par_emul="parallel -j0 --ssh 'sshpass ssh' --nonall --tag --linebuffer"
If you want to supply a password run: SSHPASS=`ssh-askpass`
or set the password directly: SSHPASS=P4$$w0rd!
If the above is set up you can then do: orgalorg -o frontend1 -o frontend2 -p -C uptime
par_emul -S frontend1 -S frontend2 uptime
orgalorg -o frontend1 -o frontend2 -p -C top -bid 1
par_emul -S frontend1 -S frontend2 top -bid 1
orgalorg -o frontend1 -o frontend2 -p -er /tmp -n 'md5sum /tmp/bigfile' -S bigfile
par_emul -S frontend1 -S frontend2 --basefile bigfile --workdir /tmp md5sum /tmp/bigfile
There are a few differences:* GNU Parallel normally uses 'ssh' and recommends using 'ssh-agent'.
* With 'sshpass' you only have to type the password once.
* GNU Parallel does not have progress indication for the file transfer.
* GNU Parallel uses /./ to indicate which part of the path should be copied to the remote side: foo/bar/./sub/dir/file will append sub/dir/file to --workdir on the remote side.
myfunc() {
echo stuff;
# More stuff
}
export -f myfunc
parallel -Shost{1..10} --tag --env myfunc --nonall myfuncThis does what you would expect:
echo My brother\'s 12\" records.txt | parallel touch parallel --colsep ' +' echo {2} {3}
or: parallel --colsep ' ' echo {7} {8}