mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-27 07:07:56 +00:00
83 lines
2.4 KiB
Plaintext
83 lines
2.4 KiB
Plaintext
echo '### Test --onall'; parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
|
### Test --onall
|
|
1
|
|
2
|
|
1
|
|
2
|
|
1
|
|
2
|
|
1
|
|
2
|
|
1
|
|
2
|
|
1
|
|
2
|
|
echo '### Test | --onall'; seq 3 | parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
|
### Test | --onall
|
|
1
|
|
2
|
|
3
|
|
1
|
|
2
|
|
3
|
|
1
|
|
2
|
|
3
|
|
1
|
|
2
|
|
3
|
|
1
|
|
2
|
|
3
|
|
1
|
|
2
|
|
3
|
|
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
|
|
### Test --onall -u
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
3
|
|
3
|
|
3
|
|
3
|
|
3
|
|
3
|
|
echo '### Test --nonall'; parallel --nonall -k -S vagrant@parallel-server1,vagrant@parallel-server2 'hostname' | sort
|
|
### Test --nonall
|
|
centos8.localdomain
|
|
freebsd11.localdomain
|
|
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;'
|
|
### Test --nonall -u - should be interleaved x y x y
|
|
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
|
|
### Test read sshloginfile from STDIN
|
|
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
|
|
### Test --nonall --basefile
|
|
/tmp/nonall--basefile
|
|
/tmp/nonall--basefile
|
|
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
|
|
### Test --onall --basefile
|
|
/tmp/onall--basefile
|
|
/tmp/onall--basefile
|
|
echo '### Test --workdir .'; ssh vagrant@parallel-server1 mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S vagrant@parallel-server1 ::: pwd
|
|
### Test --workdir .
|
|
/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
|
|
### Test --wd .
|
|
/usr/home/vagrant/mydir
|