2020-08-07 20:20:30 +00:00
echo '### Test --onall'; parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
2011-05-28 14:33:22 +00:00
### Test --onall
1
2
1
2
1
2
1
2
1
2
1
2
2020-08-07 20:20:30 +00:00
echo '### Test | --onall'; seq 3 | parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: -
2011-05-31 17:53:25 +00:00
### Test | --onall
2011-05-28 14:33:22 +00:00
1
2011-05-31 17:53:25 +00:00
2
3
2011-05-28 14:33:22 +00:00
1
2
3
2011-05-31 17:53:25 +00:00
1
2011-05-28 14:33:22 +00:00
2
2011-05-31 17:53:25 +00:00
3
2011-05-28 14:33:22 +00:00
1
2011-05-31 17:53:25 +00:00
2
2011-05-28 14:33:22 +00:00
3
2011-05-31 17:53:25 +00:00
1
2011-05-28 14:33:22 +00:00
2
3
1
2011-05-31 17:53:25 +00:00
2
3
2020-08-07 20:20:30 +00:00
echo '### Test --onall -u'; parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 -u '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
2011-05-31 17:53:25 +00:00
### Test --onall -u
1
1
1
2011-05-28 14:33:22 +00:00
1
2011-05-31 17:53:25 +00:00
1
1
2
2
2
2
2011-05-28 14:33:22 +00:00
2
2
3
3
2011-05-31 17:53:25 +00:00
3
3
3
2011-05-28 14:33:22 +00:00
3
2020-08-07 20:20:30 +00:00
echo '### Test --nonall'; parallel --nonall -k -S vagrant@parallel-server1,vagrant@parallel-server2 'hostname' | sort
2011-05-28 14:33:22 +00:00
### Test --nonall
2020-08-07 20:20:30 +00:00
centos8.localdomain
freebsd11.localdomain
2020-10-22 19:47:01 +00:00
echo '### Test --nonall -u - should be interleaved x y x y'; parallel --nonall --sshdelay 2 -S vagrant@parallel-server1,vagrant@parallel-server2 -u 'hostname|grep -q centos && sleep 2; hostname;sleep 4;hostname;'
2013-03-23 20:42:08 +00:00
### Test --nonall -u - should be interleaved x y x y
2020-08-07 20:20:30 +00:00
freebsd11.localdomain
centos8.localdomain
freebsd11.localdomain
centos8.localdomain
echo '### Test read sshloginfile from STDIN'; echo vagrant@parallel-server1 | parallel -S - --nonall hostname; echo vagrant@parallel-server1 | parallel --sshloginfile - --nonall hostname
2011-06-03 12:53:14 +00:00
### Test read sshloginfile from STDIN
2020-08-07 20:20:30 +00:00
centos8.localdomain
centos8.localdomain
echo '### Test --nonall --basefile'; touch /tmp/nonall--basefile; parallel --nonall --basefile /tmp/nonall--basefile -S vagrant@parallel-server1,vagrant@parallel-server2 ls /tmp/nonall--basefile\; rm /tmp/nonall--basefile; rm /tmp/nonall--basefile
2011-08-20 19:13:25 +00:00
### Test --nonall --basefile
/tmp/nonall--basefile
/tmp/nonall--basefile
2020-08-07 20:20:30 +00:00
echo '### Test --onall --basefile'; touch /tmp/onall--basefile; parallel --onall --basefile /tmp/onall--basefile -S vagrant@parallel-server1,vagrant@parallel-server2 ls {}\; rm {} ::: /tmp/onall--basefile; rm /tmp/onall--basefile
2011-08-20 19:13:25 +00:00
### Test --onall --basefile
/tmp/onall--basefile
/tmp/onall--basefile
2020-08-07 20:20:30 +00:00
echo '### Test --workdir .'; ssh vagrant@parallel-server1 mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S vagrant@parallel-server1 ::: pwd
2012-02-21 20:06:23 +00:00
### Test --workdir .
2020-08-07 20:20:30 +00:00
/home/vagrant/mydir
echo '### Test --wd .'; ssh vagrant@parallel-server2 mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S vagrant@parallel-server2 ::: pwd
2012-02-21 20:06:23 +00:00
### Test --wd .
2020-08-07 20:20:30 +00:00
/usr/home/vagrant/mydir