2010-06-22 13:24:55 +00:00
|
|
|
### Test -p --interactive
|
|
|
|
spawn /tmp/parallel-script-for-expect
|
2014-12-26 17:31:06 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2015-01-21 21:24:23 +00:00
|
|
|
When using programs that use GNU Parallel to process data for publication
|
|
|
|
please cite:
|
2013-11-22 17:24:09 +00:00
|
|
|
|
|
|
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
|
|
;login: The USENIX Magazine, February 2011:42-47.
|
|
|
|
|
|
|
|
This helps funding further development; and it won't cost you a cent.
|
2014-12-26 17:31:06 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2015-01-21 21:24:23 +00:00
|
|
|
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2011-02-21 01:31:30 +00:00
|
|
|
sleep 0.1; echo opt-p 1 ?...y
|
|
|
|
sleep 0.1; echo opt-p 2 ?...n
|
|
|
|
sleep 0.1; echo opt-p 3 ?...y
|
2010-06-22 13:24:55 +00:00
|
|
|
opt-p 1
|
|
|
|
opt-p 3
|
2014-12-26 17:31:06 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2015-01-21 21:24:23 +00:00
|
|
|
When using programs that use GNU Parallel to process data for publication
|
|
|
|
please cite:
|
2013-11-22 17:24:09 +00:00
|
|
|
|
|
|
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
|
|
;login: The USENIX Magazine, February 2011:42-47.
|
|
|
|
|
|
|
|
This helps funding further development; and it won't cost you a cent.
|
2014-12-26 17:31:06 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2015-01-21 21:24:23 +00:00
|
|
|
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2011-02-21 01:31:30 +00:00
|
|
|
sleep 0.1; echo opt--interactive 1 ?...y
|
|
|
|
sleep 0.1; echo opt--interactive 2 ?...n
|
|
|
|
sleep 0.1; echo opt--interactive 3 ?...y
|
2010-06-22 13:24:55 +00:00
|
|
|
opt--interactive 1
|
2011-11-22 21:38:57 +00:00
|
|
|
opt--interactive 3
|
|
|
|
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test killing children with --timeout and exit value (failed if timed out)'
|
2014-07-14 16:25:45 +00:00
|
|
|
### Test killing children with --timeout and exit value (failed if timed out)
|
2014-07-21 15:07:48 +00:00
|
|
|
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc; parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ; echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
|
2014-07-14 16:25:45 +00:00
|
|
|
0 0 0
|
|
|
|
2
|
|
|
|
0 0 0
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -L -l and --max-lines'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -L -l and --max-lines
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | parallel -km -L2 echo
|
2011-01-11 12:42:14 +00:00
|
|
|
a_b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | parallel -k -L2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | xargs -L2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -L1 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -L1 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | parallel -km -L1 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | parallel -k -L1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b;echo c) | xargs -L1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo 'Lines ending in space should continue on next line'
|
2011-01-25 23:34:08 +00:00
|
|
|
Lines ending in space should continue on next line
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -L1 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -L1 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d) | parallel -km -L1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d) | parallel -k -L1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d) | xargs -L1 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c
|
|
|
|
d
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -L2 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -L2 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -L2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -L2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs -L2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -l echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -l echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -l -km echo # This behaves wrong
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -l -k echo # This behaves wrong
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -l2 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -l2 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs -l1 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs -l1 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l1 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l1 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs --max-lines=2 echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs --max-lines=2 echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km --max-lines 2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k --max-lines 2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines=2 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### xargs --max-lines echo'
|
2011-01-25 23:34:08 +00:00
|
|
|
### xargs --max-lines echo
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -km echo # This behaves wrong
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -k echo # This behaves wrong
|
2010-06-12 23:24:25 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines echo
|
2010-06-25 23:56:14 +00:00
|
|
|
a_b c
|
|
|
|
d
|
|
|
|
e
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### test too long args'
|
2010-06-12 23:24:25 +00:00
|
|
|
### test too long args
|
2014-07-15 00:40:38 +00:00
|
|
|
perl -e 'print "z"x1000000' | parallel echo 2>&1
|
2015-02-22 14:09:26 +00:00
|
|
|
parallel: Error: Command line too long (1000005 >= 131071) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
2014-07-15 00:40:38 +00:00
|
|
|
perl -e 'print "z"x1000000' | xargs echo 2>&1
|
2010-06-12 23:24:25 +00:00
|
|
|
xargs: argument line too long
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
9 10
|
2015-02-22 14:09:26 +00:00
|
|
|
parallel: Error: Command line too long (1000007 >= 10) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout xargs -s 10 echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
xargs: argument line too long
|
|
|
|
9 10
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -kX -s 10 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
9 10
|
2015-02-22 14:09:26 +00:00
|
|
|
parallel: Error: Command line too long (1000007 >= 10) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -x'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -x
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
2010-11-22 09:35:53 +00:00
|
|
|
9 10
|
2015-02-22 14:09:26 +00:00
|
|
|
parallel: Error: Command line too long (10 >= 10) at input 0: 12345
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
2010-06-25 23:56:14 +00:00
|
|
|
7 8
|
2010-11-22 09:35:53 +00:00
|
|
|
9 10
|
2015-02-22 14:09:26 +00:00
|
|
|
parallel: Error: Command line too long (10 >= 10) at input 0: 12345
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 12345; seq 12 15) | stdout xargs -s 10 -x echo
|
2010-06-25 23:56:14 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
2010-06-12 23:24:25 +00:00
|
|
|
xargs: argument line too long
|
|
|
|
7 8
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
9 10
|
|
|
|
1234
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
2010-06-12 23:24:25 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
9 10
|
|
|
|
1234
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
2014-07-15 00:40:38 +00:00
|
|
|
(seq 1 10; echo 1234; seq 12 15) | stdout xargs -s 10 -x echo
|
2010-06-25 23:56:14 +00:00
|
|
|
1 2
|
|
|
|
3 4
|
|
|
|
5 6
|
|
|
|
7 8
|
|
|
|
9 10
|
|
|
|
1234
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -a and --arg-file: Read input from file instead of stdin'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -a and --arg-file: Read input from file instead of stdin
|
2015-02-01 13:38:26 +00:00
|
|
|
seq 1 10 >/tmp/parallel_$$-1; parallel -k -a /tmp/parallel_$$-1 echo; rm /tmp/parallel_$$-1
|
2010-02-03 23:54:06 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
2015-02-01 13:38:26 +00:00
|
|
|
seq 1 10 >/tmp/parallel_$$-2; parallel -k --arg-file /tmp/parallel_$$-2 echo; rm /tmp/parallel_$$-2
|
2010-02-03 23:54:06 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
2010-06-12 23:24:25 +00:00
|
|
|
xargs Expect: 3 1 2
|
2010-04-21 19:28:00 +00:00
|
|
|
3
|
|
|
|
1
|
|
|
|
2
|
2010-09-05 10:22:08 +00:00
|
|
|
parallel Expect: 3 1 via psedotty 2
|
2014-12-26 17:31:06 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2015-01-21 21:24:23 +00:00
|
|
|
When using programs that use GNU Parallel to process data for publication
|
|
|
|
please cite:
|
2013-11-22 17:24:09 +00:00
|
|
|
|
|
|
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
|
|
;login: The USENIX Magazine, February 2011:42-47.
|
|
|
|
|
|
|
|
This helps funding further development; and it won't cost you a cent.
|
2014-12-26 17:31:06 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2015-01-21 21:24:23 +00:00
|
|
|
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2010-06-12 23:24:25 +00:00
|
|
|
3
|
|
|
|
1
|
2010-09-05 10:22:08 +00:00
|
|
|
via pseudotty
|
2010-06-12 23:24:25 +00:00
|
|
|
2
|
|
|
|
xargs Expect: 1 3 2
|
|
|
|
1
|
|
|
|
3
|
|
|
|
2
|
2010-09-05 10:22:08 +00:00
|
|
|
parallel Expect: 1 3 2 via pseudotty
|
2014-12-26 17:31:06 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2015-01-21 21:24:23 +00:00
|
|
|
When using programs that use GNU Parallel to process data for publication
|
|
|
|
please cite:
|
2013-11-22 17:24:09 +00:00
|
|
|
|
|
|
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
|
|
;login: The USENIX Magazine, February 2011:42-47.
|
|
|
|
|
|
|
|
This helps funding further development; and it won't cost you a cent.
|
2014-12-26 17:31:06 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2015-01-21 21:24:23 +00:00
|
|
|
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
2013-11-22 17:24:09 +00:00
|
|
|
|
2010-04-21 19:28:00 +00:00
|
|
|
1
|
|
|
|
3
|
|
|
|
2
|
2010-09-05 10:22:08 +00:00
|
|
|
via pseudotty
|
2011-07-17 00:22:39 +00:00
|
|
|
### Hans found a bug giving unitialized variable
|
|
|
|
gzip /tmp/parallel_f1
|
|
|
|
gzip /tmp/parallel_f2'
|
|
|
|
'
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -i and --replace: Replace with argument'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -i and --replace: Replace with argument
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{}ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{}ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k -i+ -eEND echo repl+ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo e; echo END; echo b) | parallel -k -i'*' -eEND echo r'*'plac'*'
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k --replace + -eEND echo repl+ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k --replace== -eEND echo repl=ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k --replace = -eEND echo repl=ce
|
2010-02-03 23:54:06 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k --replace=^ -eEND echo repl^ce
|
2010-04-13 14:05:21 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo a; echo END; echo b) | parallel -k -I^ -eEND echo repl^ce
|
2010-04-13 14:05:21 +00:00
|
|
|
replace
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -E: Artificial end-of-file'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -E: Artificial end-of-file
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k -E END echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k -EEND echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -e and --eof: Artificial end-of-file'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -e and --eof: Artificial end-of-file
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k -e END echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k -eEND echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k --eof=END echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo include this; echo END; echo not this) | parallel -k --eof END echo
|
2010-02-03 23:54:06 +00:00
|
|
|
include this
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -n and --max-args: Max number of args per line (only with -X and -m)'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test -n and --max-args: Max number of args per line (only with -X and -m)
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -m echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -m echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args=1 -X echo
|
2010-06-25 23:56:14 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args=2 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 echo
|
2010-06-25 23:56:14 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --max-procs and -P: Number of processes'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --max-procs and -P: Number of processes
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 10 | parallel -k --max-procs +0 echo max proc
|
2010-04-13 20:59:39 +00:00
|
|
|
max proc 1
|
|
|
|
max proc 2
|
|
|
|
max proc 3
|
|
|
|
max proc 4
|
|
|
|
max proc 5
|
|
|
|
max proc 6
|
|
|
|
max proc 7
|
|
|
|
max proc 8
|
|
|
|
max proc 9
|
|
|
|
max proc 10
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 10 | parallel -k -P 200% echo 200% proc
|
2010-04-13 20:59:39 +00:00
|
|
|
200% proc 1
|
|
|
|
200% proc 2
|
|
|
|
200% proc 3
|
|
|
|
200% proc 4
|
|
|
|
200% proc 5
|
|
|
|
200% proc 6
|
|
|
|
200% proc 7
|
|
|
|
200% proc 8
|
|
|
|
200% proc 9
|
|
|
|
200% proc 10
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --delimiter and -d: Delimiter instead of newline'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --delimiter and -d: Delimiter instead of newline
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '# Yes there is supposed to be an extra newline for -d N'
|
2010-06-12 23:24:25 +00:00
|
|
|
# Yes there is supposed to be an extra newline for -d N
|
2015-01-03 17:57:37 +00:00
|
|
|
echo line 1Nline 2Nline 3 | parallel -k -d N echo This is
|
2010-02-03 23:54:06 +00:00
|
|
|
This is line 1
|
|
|
|
This is line 2
|
|
|
|
This is line 3
|
|
|
|
|
2015-01-03 17:57:37 +00:00
|
|
|
echo line 1Nline 2Nline 3 | parallel -k --delimiter N echo This is
|
2010-02-03 23:54:06 +00:00
|
|
|
This is line 1
|
|
|
|
This is line 2
|
|
|
|
This is line 3
|
|
|
|
|
2015-01-03 17:57:37 +00:00
|
|
|
printf "delimiter NUL line 1\0line 2\0line 3" | parallel -k -d '\0' echo
|
2010-04-13 20:59:39 +00:00
|
|
|
delimiter NUL line 1
|
2010-02-03 23:54:06 +00:00
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
printf "delimiter TAB line 1\tline 2\tline 3" | parallel -k --delimiter '\t' echo
|
2010-04-13 20:59:39 +00:00
|
|
|
delimiter TAB line 1
|
2010-02-03 23:54:06 +00:00
|
|
|
line 2
|
|
|
|
line 3
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --max-chars and -s: Max number of chars in a line'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --max-chars and -s: Max number of chars in a line
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-chars 25 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo line 1;echo line 1;echo line 2) | parallel -k -s 25 -X echo
|
2010-02-03 23:54:06 +00:00
|
|
|
line 1 line 1
|
|
|
|
line 2
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --no-run-if-empty and -r: This should give no output'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --no-run-if-empty and -r: This should give no output
|
2015-01-03 17:57:37 +00:00
|
|
|
echo " " | parallel -r echo
|
|
|
|
echo " " | parallel --no-run-if-empty echo
|
|
|
|
echo '### Test --help and -h: Help output (just check we get the same amount of lines)'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --help and -h: Help output (just check we get the same amount of lines)
|
2015-01-03 17:57:37 +00:00
|
|
|
echo Output from -h and --help
|
2010-04-18 14:18:31 +00:00
|
|
|
Output from -h and --help
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -h | wc -l
|
2015-02-22 14:09:26 +00:00
|
|
|
37
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel --help | wc -l
|
2015-02-22 14:09:26 +00:00
|
|
|
37
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --version: Version output (just check we get the same amount of lines)'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --version: Version output (just check we get the same amount of lines)
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel --version | wc -l
|
2014-12-26 17:31:06 +00:00
|
|
|
11
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --verbose and -t'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --verbose and -t
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo b; echo c; echo f) | parallel -k -t echo {}ar 2>&1 >/dev/null
|
2010-02-03 23:54:06 +00:00
|
|
|
echo bar
|
|
|
|
echo car
|
|
|
|
echo far
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo b; echo c; echo f) | parallel -k --verbose echo {}ar 2>&1 >/dev/null
|
2010-02-03 23:54:06 +00:00
|
|
|
echo bar
|
|
|
|
echo car
|
|
|
|
echo far
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --show-limits'
|
2010-06-12 23:24:25 +00:00
|
|
|
### Test --show-limits
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
2010-04-21 19:28:00 +00:00
|
|
|
Maximal size of command: 131071
|
|
|
|
Maximal used size of command: 131071
|
|
|
|
|
|
|
|
Execution of will continue now, and it will try to read its input
|
|
|
|
and run commands; if this is not what you wanted to happen, please
|
|
|
|
press CTRL-D or CTRL-C
|
|
|
|
bar
|
|
|
|
car
|
|
|
|
far
|
2015-01-03 17:57:37 +00:00
|
|
|
(echo b; echo c; echo f) | parallel -j1 -kX --show-limits -s 100 echo {}ar
|
2010-04-21 19:28:00 +00:00
|
|
|
Maximal size of command: 131071
|
|
|
|
Maximal used size of command: 100
|
|
|
|
|
|
|
|
Execution of will continue now, and it will try to read its input
|
|
|
|
and run commands; if this is not what you wanted to happen, please
|
|
|
|
press CTRL-D or CTRL-C
|
2010-06-25 23:56:14 +00:00
|
|
|
bar car far
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test empty line as input'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test empty line as input
|
2015-01-03 17:57:37 +00:00
|
|
|
echo | parallel echo empty input line
|
2011-07-29 11:45:34 +00:00
|
|
|
empty input line
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Tests if (cat | sh) works'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Tests if (cat | sh) works
|
2015-01-03 17:57:37 +00:00
|
|
|
perl -e 'for(1..25) {print "echo a $_; echo b $_\n"}' | parallel 2>&1 | sort
|
2011-07-29 11:45:34 +00:00
|
|
|
a 1
|
|
|
|
a 10
|
|
|
|
a 11
|
|
|
|
a 12
|
|
|
|
a 13
|
|
|
|
a 14
|
|
|
|
a 15
|
|
|
|
a 16
|
|
|
|
a 17
|
|
|
|
a 18
|
|
|
|
a 19
|
|
|
|
a 2
|
|
|
|
a 20
|
|
|
|
a 21
|
|
|
|
a 22
|
|
|
|
a 23
|
|
|
|
a 24
|
|
|
|
a 25
|
|
|
|
a 3
|
|
|
|
a 4
|
|
|
|
a 5
|
|
|
|
a 6
|
|
|
|
a 7
|
|
|
|
a 8
|
|
|
|
a 9
|
|
|
|
b 1
|
|
|
|
b 10
|
|
|
|
b 11
|
|
|
|
b 12
|
|
|
|
b 13
|
|
|
|
b 14
|
|
|
|
b 15
|
|
|
|
b 16
|
|
|
|
b 17
|
|
|
|
b 18
|
|
|
|
b 19
|
|
|
|
b 2
|
|
|
|
b 20
|
|
|
|
b 21
|
|
|
|
b 22
|
|
|
|
b 23
|
|
|
|
b 24
|
|
|
|
b 25
|
|
|
|
b 3
|
|
|
|
b 4
|
|
|
|
b 5
|
|
|
|
b 6
|
|
|
|
b 7
|
|
|
|
b 8
|
|
|
|
b 9
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test if xargs-mode works'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test if xargs-mode works
|
2015-01-03 17:57:37 +00:00
|
|
|
perl -e 'for(1..25) {print "a $_\nb $_\n"}' | parallel echo 2>&1 | sort
|
2011-07-29 11:45:34 +00:00
|
|
|
a 1
|
|
|
|
a 10
|
|
|
|
a 11
|
|
|
|
a 12
|
|
|
|
a 13
|
|
|
|
a 14
|
|
|
|
a 15
|
|
|
|
a 16
|
|
|
|
a 17
|
|
|
|
a 18
|
|
|
|
a 19
|
|
|
|
a 2
|
|
|
|
a 20
|
|
|
|
a 21
|
|
|
|
a 22
|
|
|
|
a 23
|
|
|
|
a 24
|
|
|
|
a 25
|
|
|
|
a 3
|
|
|
|
a 4
|
|
|
|
a 5
|
|
|
|
a 6
|
|
|
|
a 7
|
|
|
|
a 8
|
|
|
|
a 9
|
|
|
|
b 1
|
|
|
|
b 10
|
|
|
|
b 11
|
|
|
|
b 12
|
|
|
|
b 13
|
|
|
|
b 14
|
|
|
|
b 15
|
|
|
|
b 16
|
|
|
|
b 17
|
|
|
|
b 18
|
|
|
|
b 19
|
|
|
|
b 2
|
|
|
|
b 20
|
|
|
|
b 21
|
|
|
|
b 22
|
|
|
|
b 23
|
|
|
|
b 24
|
|
|
|
b 25
|
|
|
|
b 3
|
|
|
|
b 4
|
|
|
|
b 5
|
|
|
|
b 6
|
|
|
|
b 7
|
|
|
|
b 8
|
|
|
|
b 9
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -q'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -q
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -kq perl -e '$ARGV[0]=~/^\S+\s+\S+$/ and print $ARGV[0],"\n"' ::: "a b" c "d e f" g "h i"
|
2011-07-29 11:45:34 +00:00
|
|
|
a b
|
|
|
|
h i
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -q {#}'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -q {#}
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -kq echo {#} ::: a b
|
2011-07-29 11:45:34 +00:00
|
|
|
1
|
|
|
|
2
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -kq echo {\#} ::: a b
|
2011-07-29 11:45:34 +00:00
|
|
|
1
|
|
|
|
2
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -kq echo {\\#} ::: a b
|
2011-07-29 11:45:34 +00:00
|
|
|
{\#} a
|
|
|
|
{\#} b
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test long commands do not take up all memory'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test long commands do not take up all memory
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 100 | parallel -j0 -qv perl -e '$r=rand(shift);for($f=0;$f<$r;$f++){$a="a"x100};print shift,"\n"' 10000 2>/dev/null | sort
|
2011-07-29 11:45:34 +00:00
|
|
|
1
|
|
|
|
10
|
|
|
|
100
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
19
|
|
|
|
2
|
|
|
|
20
|
|
|
|
21
|
|
|
|
22
|
|
|
|
23
|
|
|
|
24
|
|
|
|
25
|
|
|
|
26
|
|
|
|
27
|
|
|
|
28
|
|
|
|
29
|
|
|
|
3
|
|
|
|
30
|
|
|
|
31
|
|
|
|
32
|
|
|
|
33
|
|
|
|
34
|
|
|
|
35
|
|
|
|
36
|
|
|
|
37
|
|
|
|
38
|
|
|
|
39
|
|
|
|
4
|
|
|
|
40
|
|
|
|
41
|
|
|
|
42
|
|
|
|
43
|
|
|
|
44
|
|
|
|
45
|
|
|
|
46
|
|
|
|
47
|
|
|
|
48
|
|
|
|
49
|
|
|
|
5
|
|
|
|
50
|
|
|
|
51
|
|
|
|
52
|
|
|
|
53
|
|
|
|
54
|
|
|
|
55
|
|
|
|
56
|
|
|
|
57
|
|
|
|
58
|
|
|
|
59
|
|
|
|
6
|
|
|
|
60
|
|
|
|
61
|
|
|
|
62
|
|
|
|
63
|
|
|
|
64
|
|
|
|
65
|
|
|
|
66
|
|
|
|
67
|
|
|
|
68
|
|
|
|
69
|
|
|
|
7
|
|
|
|
70
|
|
|
|
71
|
|
|
|
72
|
|
|
|
73
|
|
|
|
74
|
|
|
|
75
|
|
|
|
76
|
|
|
|
77
|
|
|
|
78
|
|
|
|
79
|
|
|
|
8
|
|
|
|
80
|
|
|
|
81
|
|
|
|
82
|
|
|
|
83
|
|
|
|
84
|
|
|
|
85
|
|
|
|
86
|
|
|
|
87
|
|
|
|
88
|
|
|
|
89
|
|
|
|
9
|
|
|
|
90
|
|
|
|
91
|
|
|
|
92
|
|
|
|
93
|
|
|
|
94
|
|
|
|
95
|
|
|
|
96
|
|
|
|
97
|
|
|
|
98
|
|
|
|
99
|
2011-09-16 13:26:17 +00:00
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 1
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 10
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 100
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 11
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 12
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 13
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 14
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 15
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 16
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 17
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 18
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 19
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 2
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 20
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 21
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 22
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 23
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 24
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 25
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 26
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 27
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 28
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 29
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 3
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 30
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 31
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 32
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 33
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 34
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 35
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 36
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 37
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 38
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 39
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 4
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 40
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 41
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 42
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 43
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 44
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 45
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 46
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 47
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 48
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 49
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 5
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 50
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 51
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 52
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 53
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 54
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 55
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 56
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 57
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 58
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 59
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 6
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 60
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 61
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 62
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 63
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 64
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 65
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 66
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 67
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 68
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 69
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 7
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 70
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 71
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 72
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 73
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 74
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 75
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 76
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 77
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 78
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 79
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 8
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 80
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 81
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 82
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 83
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 84
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 85
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 86
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 87
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 88
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 89
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 9
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 90
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 91
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 92
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 93
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 94
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 95
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 96
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 97
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 98
|
|
|
|
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 99
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test 0-arguments'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test 0-arguments
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 2 | parallel -k -n0 echo n0
|
2011-07-29 11:45:34 +00:00
|
|
|
n0
|
|
|
|
n0
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 2 | parallel -k -L0 echo L0
|
2011-07-29 11:45:34 +00:00
|
|
|
L0
|
|
|
|
L0
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 2 | parallel -k -N0 echo N0
|
2011-07-29 11:45:34 +00:00
|
|
|
N0
|
|
|
|
N0
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Because of --tollef -l, then -l0 == -l1, sorry'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Because of --tollef -l, then -l0 == -l1, sorry
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 2 | parallel -k -l0 echo l0
|
2011-07-29 11:45:34 +00:00
|
|
|
l0 1
|
|
|
|
l0 2
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test replace {}'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test replace {}
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 2 | parallel -k -N0 echo replace {} curlies
|
2011-07-29 11:45:34 +00:00
|
|
|
replace curlies
|
|
|
|
replace curlies
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test arguments on commandline'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test arguments on commandline
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel -k -N0 echo args on cmdline ::: 1 2
|
2011-07-29 11:45:34 +00:00
|
|
|
args on cmdline
|
|
|
|
args on cmdline
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --nice locally'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test --nice locally
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel --nice 1 -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
|
2013-03-24 16:24:59 +00:00
|
|
|
\nice -n1 /bin/bash -c PAR=a\ bash\ -c\ \"echo\ \ \\\$PAR\ b\"
|
2011-07-29 11:45:34 +00:00
|
|
|
a b
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test --nice remote'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test --nice remote
|
2015-01-03 17:57:37 +00:00
|
|
|
stdout parallel --nice 1 -S .. -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b | perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'
|
2015-02-01 13:38:26 +00:00
|
|
|
ssh one-server exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"1\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"\\\\\\\\nice\\\ -n1\\\ /bin/bash\\\ -c\\\ PAR=a\\\\\\\\\\\ bash\\\\\\\\\\\ -c\\\\\\\\\\\ \\\\\\\\\\\\\\\"echo\\\\\\\\\\\ \\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$PAR\\\\\\\\\\\ b\\\\\\\\\\\\\\\"\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);
|
2011-07-29 11:45:34 +00:00
|
|
|
a b
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test distribute arguments at EOF to 2 jobslots'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test distribute arguments at EOF to 2 jobslots
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 92 | parallel -j+0 -kX -s 100 echo
|
2011-07-29 11:45:34 +00:00
|
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
|
|
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
2013-11-22 17:24:09 +00:00
|
|
|
66 67 68 69
|
|
|
|
70 71 72 73
|
|
|
|
74 75 76 77
|
|
|
|
78 79 80 81
|
|
|
|
82 83 84 85
|
|
|
|
86 87 88 89
|
|
|
|
90 91 92
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test distribute arguments at EOF to 5 jobslots'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test distribute arguments at EOF to 5 jobslots
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 92 | parallel -j+3 -kX -s 100 echo
|
2011-07-29 11:45:34 +00:00
|
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
|
|
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
2013-11-22 17:24:09 +00:00
|
|
|
66 67 68
|
|
|
|
69 70 71
|
|
|
|
72 73 74
|
|
|
|
75 76 77
|
|
|
|
78 79 80
|
|
|
|
81 82 83
|
|
|
|
84 85 86
|
|
|
|
87 88 89
|
2011-07-29 11:45:34 +00:00
|
|
|
90 91 92
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test distribute arguments at EOF to infinity jobslots'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test distribute arguments at EOF to infinity jobslots
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 1 92 | parallel -j0 -kX -s 100 echo 2>/dev/null
|
2011-07-29 11:45:34 +00:00
|
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
|
|
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
|
|
|
66
|
|
|
|
67
|
|
|
|
68
|
|
|
|
69
|
|
|
|
70
|
|
|
|
71
|
|
|
|
72
|
|
|
|
73
|
|
|
|
74
|
|
|
|
75
|
|
|
|
76
|
|
|
|
77
|
|
|
|
78
|
|
|
|
79
|
|
|
|
80
|
|
|
|
81
|
|
|
|
82
|
|
|
|
83
|
|
|
|
84
|
|
|
|
85
|
|
|
|
86
|
|
|
|
87
|
|
|
|
88
|
|
|
|
89
|
|
|
|
90
|
|
|
|
91
|
|
|
|
92
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -N is not broken by distribution - single line'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -N is not broken by distribution - single line
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 9 | parallel -N 10 echo
|
2011-07-29 11:45:34 +00:00
|
|
|
1 2 3 4 5 6 7 8 9
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -N is not broken by distribution - two lines'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -N is not broken by distribution - two lines
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 19 | parallel -k -N 10 echo
|
2011-07-29 11:45:34 +00:00
|
|
|
1 2 3 4 5 6 7 8 9 10
|
|
|
|
11 12 13 14 15 16 17 18 19
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -N context replace'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -N context replace
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 19 | parallel -k -N 10 echo a{}b
|
2011-07-29 11:45:34 +00:00
|
|
|
a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b
|
|
|
|
a11b a12b a13b a14b a15b a16b a17b a18b a19b
|
2015-01-03 17:57:37 +00:00
|
|
|
echo '### Test -L context replace'
|
2011-07-29 11:45:34 +00:00
|
|
|
### Test -L context replace
|
2015-01-03 17:57:37 +00:00
|
|
|
seq 19 | parallel -k -L 10 echo a{}b
|
2011-07-29 11:45:34 +00:00
|
|
|
a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b
|
|
|
|
a11b a12b a13b a14b a15b a16b a17b a18b a19b
|