2015-12-13 00:54:08 +00:00
echo '### Test --onall'; parallel --onall --tag -k -S parallel@lo,csh@lo '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
### Test --onall
csh@lo 1
csh@lo 2
csh@lo 1
csh@lo 2
csh@lo 1
csh@lo 2
parallel@lo 1
parallel@lo 2
parallel@lo 1
parallel@lo 2
parallel@lo 1
parallel@lo 2
echo '### Test | --onall'; seq 3 | parallel --onall --tag -k -S parallel@lo,csh@lo '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: -
### Test | --onall
csh@lo 1
csh@lo 2
csh@lo 3
csh@lo 1
csh@lo 2
csh@lo 3
csh@lo 1
csh@lo 2
csh@lo 3
parallel@lo 1
parallel@lo 2
parallel@lo 3
parallel@lo 1
parallel@lo 2
parallel@lo 3
parallel@lo 1
parallel@lo 2
parallel@lo 3
echo '### Test --onall -u'; parallel --onall -S parallel@lo,csh@lo -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 parallel@lo,csh@lo pwd | sort
### Test --nonall
2017-06-22 11:35:58 +00:00
/home/csh
/home/parallel
2015-12-13 00:54:08 +00:00
echo '### Test --nonall -u - should be interleaved x y x y'; parallel --nonall -S parallel@lo,csh@lo -u 'pwd|grep -q csh && sleep 3; pwd;sleep 12;pwd;'
### Test --nonall -u - should be interleaved x y x y
2017-06-22 11:35:58 +00:00
/home/parallel
/home/csh
/home/parallel
/home/csh
2015-12-13 00:54:08 +00:00
echo '### Test read sshloginfile from STDIN'; echo parallel@lo,csh@lo | parallel -S - -k --nonall pwd; echo parallel@lo,csh@lo | parallel --sshloginfile - -k --onall pwd\; echo ::: foo
### Test read sshloginfile from STDIN
2017-06-22 11:35:58 +00:00
/home/csh
/home/parallel
/home/csh
2015-12-13 00:54:08 +00:00
foo
2017-06-22 11:35:58 +00:00
/home/parallel
2015-12-13 00:54:08 +00:00
foo
echo '**'
**
echo '### Test --nonall --basefile'; touch tmp/nonall--basefile; stdout parallel --nonall --basefile tmp/nonall--basefile -S parallel@lo,csh@lo ls tmp/nonall--basefile; stdout parallel --nonall -S parallel@lo,csh@lo rm tmp/nonall--basefile; stdout rm tmp/nonall--basefile
### Test --nonall --basefile
tmp/nonall--basefile
tmp/nonall--basefile
echo '**'
**
echo '### Test --onall --basefile'; touch tmp/onall--basefile; stdout parallel --onall --basefile tmp/onall--basefile -S parallel@lo,csh@lo ls {} ::: tmp/onall--basefile; stdout parallel --onall -S parallel@lo,csh@lo rm {} ::: tmp/onall--basefile; stdout rm tmp/onall--basefile
### Test --onall --basefile
tmp/onall--basefile
tmp/onall--basefile
echo '**'
**
echo '### Test --nonall --basefile --cleanup (rm should fail)'; touch tmp/nonall--basefile--clean; stdout parallel --nonall --basefile tmp/nonall--basefile--clean --cleanup -S parallel@lo,csh@lo ls tmp/nonall--basefile--clean; stdout parallel --nonall -S parallel@lo,csh@lo rm tmp/nonall--basefile--clean; stdout rm tmp/nonall--basefile--clean
### Test --nonall --basefile --cleanup (rm should fail)
tmp/nonall--basefile--clean
tmp/nonall--basefile--clean
2017-01-06 18:10:20 +00:00
rm: cannot remove 'tmp/nonall--basefile--clean': No such file or directory
rm: cannot remove 'tmp/nonall--basefile--clean': No such file or directory
2015-12-13 00:54:08 +00:00
echo '**'
**
echo '### Test --onall --basefile --cleanup (rm should fail)'; touch tmp/onall--basefile--clean; stdout parallel --onall --basefile tmp/onall--basefile--clean --cleanup -S parallel@lo,csh@lo ls {} ::: tmp/onall--basefile--clean; stdout parallel --onall -S parallel@lo,csh@lo rm {} ::: tmp/onall--basefile--clean; stdout rm tmp/onall--basefile--clean
### Test --onall --basefile --cleanup (rm should fail)
tmp/onall--basefile--clean
tmp/onall--basefile--clean
2017-01-06 18:10:20 +00:00
rm: cannot remove 'tmp/onall--basefile--clean': No such file or directory
rm: cannot remove 'tmp/onall--basefile--clean': No such file or directory
2015-12-13 00:54:08 +00:00
echo '**'
**
echo '### Test --workdir .'; ssh parallel@lo mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S parallel@lo ::: pwd
### Test --workdir .
2017-06-22 11:35:58 +00:00
/home/parallel/mydir
2015-12-13 00:54:08 +00:00
echo '### Test --wd .'; ssh csh@lo mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S csh@lo ::: pwd
### Test --wd .
2017-06-22 11:35:58 +00:00
/home/csh/mydir
2016-01-03 23:33:09 +00:00
echo '### Test --wd {}'; ssh csh@lo rm -rf wd1 wd2; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir {} -S csh@lo touch ::: wd1 wd2; ssh csh@lo ls -d wd1 wd2
### Test --wd {}
wd1
wd2
echo '### Test --wd {= =}'; ssh csh@lo rm -rf WD1 WD2; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir '{= $_=uc($_) =}' -S csh@lo touch ::: wd1 wd2; ssh csh@lo ls -d WD1 WD2
### Test --wd {= =}
WD1
WD2
2016-01-06 15:22:30 +00:00
echo '### Test --nonall --wd'; parallel --workdir /tmp -S csh@lo --nonall pwd
### Test --nonall --wd
/tmp