mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
120 lines
4.3 KiB
Plaintext
120 lines
4.3 KiB
Plaintext
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
|
||
/home/csh
|
||
/home/parallel
|
||
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
|
||
/home/parallel
|
||
/home/csh
|
||
/home/parallel
|
||
/home/csh
|
||
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
|
||
/home/csh
|
||
/home/parallel
|
||
/home/csh
|
||
foo
|
||
/home/parallel
|
||
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
|
||
rm: cannot remove ‘tmp/nonall--basefile--clean’: No such file or directory
|
||
rm: cannot remove ‘tmp/nonall--basefile--clean’: No such file or directory
|
||
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
|
||
rm: cannot remove ‘tmp/onall--basefile--clean’: No such file or directory
|
||
rm: cannot remove ‘tmp/onall--basefile--clean’: No such file or directory
|
||
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 .
|
||
/home/parallel/mydir
|
||
echo '### Test --wd .'; ssh csh@lo mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S csh@lo ::: pwd
|
||
### Test --wd .
|
||
/home/csh/mydir
|
||
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
|
||
echo '### Test --nonall --wd'; parallel --workdir /tmp -S csh@lo --nonall pwd
|
||
### Test --nonall --wd
|
||
/tmp
|