3 ms·
The examples in the GIF-animation can be emulated by GNU Parallel using this: To make the emulation easier, make a simple alias: alias par_emul="parallel -j
by ole_tange 10y ago
The examples in the GIF-animation can be emulated by GNU Parallel using this:
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.