2011-05-28 14:33:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SERVER1=parallel-server3
|
|
|
|
SERVER2=parallel-server2
|
|
|
|
|
2011-07-16 23:46:02 +00:00
|
|
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k
|
2011-05-28 14:33:22 +00:00
|
|
|
echo '### Test --onall'
|
2011-07-16 23:46:02 +00:00
|
|
|
parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
2011-05-31 17:53:25 +00:00
|
|
|
echo '### Test | --onall'
|
|
|
|
seq 3 | parallel --onall -S parallel@$SERVER2,$SERVER1 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
|
|
|
echo '### Test --onall -u'
|
|
|
|
parallel --onall -S parallel@$SERVER2,$SERVER1 -u '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
|
2011-05-28 14:33:22 +00:00
|
|
|
echo '### Test --nonall'
|
2011-06-21 23:14:59 +00:00
|
|
|
parallel --nonall -k -S parallel@$SERVER2,$SERVER1 'hostname' | sort
|
|
|
|
echo '### Test --nonall -u'
|
2011-07-16 23:46:02 +00:00
|
|
|
parallel --nonall -S parallel@$SERVER2,$SERVER1 -u 'hostname|grep -q nlv.pi.dk && sleep 2; hostname;sleep 4;hostname;'
|
2011-06-03 12:53:14 +00:00
|
|
|
echo '### Test read sshloginfile from STDIN'
|
|
|
|
echo nlv.pi.dk | parallel -S - --nonall hostname
|
|
|
|
echo nlv.pi.dk | parallel --sshloginfile - --nonall hostname
|
|
|
|
EOF
|