2009-09-04 05:23:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2010-05-27 06:09:28 +00:00
|
|
|
echo '### Test -k'
|
2009-09-04 05:23:57 +00:00
|
|
|
ulimit -n 50
|
2010-07-14 10:00:10 +00:00
|
|
|
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {}"; echo "echo end") \
|
2010-10-26 23:50:58 +00:00
|
|
|
| stdout parallel -k -j0
|
2009-10-26 11:22:21 +00:00
|
|
|
|
2010-09-21 20:00:30 +00:00
|
|
|
echo '### Test --keep-order'
|
|
|
|
(seq 0 2) | parallel --keep-order -j100% -S 1/:,2/parallel@server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
|
|
|
|
|
|
|
echo '### Test --keeporder'
|
|
|
|
(seq 0 2) | parallel --keeporder -j100% -S 1/:,2/parallel@server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
|
|
|
|
2010-05-27 06:09:28 +00:00
|
|
|
echo '### Test SIGTERM'
|
2010-10-26 23:50:58 +00:00
|
|
|
(sleep 5; killall parallel -TERM) & seq 1 100 | stdout parallel -k sleep 3';' echo | sort
|