2014-07-15 00:40:38 +00:00
echo '### bug #41565: Print happens in blocks - not after each job complete'
2014-02-15 13:10:52 +00:00
### bug #41565: Print happens in blocks - not after each job complete
2014-09-20 19:36:02 +00:00
echo 'The timing here is important: a full second between each'
The timing here is important: a full second between each
2015-07-22 06:28:05 +00:00
perl -e 'for(1..30){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
2014-02-15 13:10:52 +00:00
1
2014-07-15 00:40:38 +00:00
echo '300 ms jobs:'
2014-02-15 13:10:52 +00:00
300 ms jobs:
2015-07-22 06:28:05 +00:00
perl -e 'for(1..30){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
2014-02-16 15:34:47 +00:00
3
2014-07-15 00:40:38 +00:00
echo '### Test --tagstring'
2012-05-06 10:43:40 +00:00
### Test --tagstring
2014-07-15 00:40:38 +00:00
nice parallel -j1 -X -v --tagstring a{}b echo ::: 3 4
2012-05-06 10:43:40 +00:00
echo 3 4
a3b a4b 3 4
2014-07-15 00:40:38 +00:00
nice parallel -j1 -k -v --tagstring a{}b echo ::: 3 4
2012-05-06 10:43:40 +00:00
echo 3
a3b 3
echo 4
a4b 4
2014-07-15 00:40:38 +00:00
nice parallel -j1 -k -v --tagstring a{}b echo job{#} ::: 3 4
2012-05-06 10:43:40 +00:00
echo job1
a3b job1
echo job2
a4b job2
2014-07-15 00:40:38 +00:00
nice parallel -j1 -k -v --tagstring ajob{#}b echo job{#} ::: 3 4
2012-05-06 10:43:40 +00:00
echo job1
ajob1b job1
echo job2
ajob2b job2
2014-07-15 00:40:38 +00:00
echo '### Bug in --load'; nice parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3
2013-03-23 20:39:48 +00:00
### Bug in --load
1
2
3
2015-01-03 17:57:37 +00:00
echo '### Test --timeout'
2013-03-23 20:39:48 +00:00
### Test --timeout
2015-08-10 22:25:37 +00:00
nice parallel -j0 -k --timeout 2 echo {}\; sleep {}\; echo {} ::: 1.1 7.7 8.8 9.9
2013-03-23 20:39:48 +00:00
1.1
1.1
7.7
8.8
2013-04-11 19:55:33 +00:00
9.9
2015-01-03 17:57:37 +00:00
echo '### Test retired'
2013-03-23 20:39:48 +00:00
### Test retired
2015-01-03 17:57:37 +00:00
stdout parallel -B foo
2013-03-23 20:39:48 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
2013-07-03 22:50:08 +00:00
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -g
2013-07-03 22:50:08 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -H 1
2013-07-03 22:50:08 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -T
2013-07-03 22:50:08 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -U foo
2013-07-03 22:50:08 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
2013-03-23 20:39:48 +00:00
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -W foo
2013-03-23 20:39:48 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2015-01-03 17:57:37 +00:00
stdout parallel -Y
2013-03-23 20:39:48 +00:00
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
2015-06-26 07:08:08 +00:00
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
2014-07-15 00:40:38 +00:00
echo '### Test --joblog followed by --resume --joblog'
2013-03-23 20:39:48 +00:00
### Test --joblog followed by --resume --joblog
2015-01-03 17:57:37 +00:00
rm -f /tmp/joblog; timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog | wc -lw; rm -f /tmp/joblog; echo '### Test --resume --joblog followed by --resume --joblog'; rm -f /tmp/joblog2; timeout -k 1 1 parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog2 | wc -lw; rm -f /tmp/joblog2; echo '### Test --header'
2013-03-23 20:39:48 +00:00
5 49
### Test --resume --joblog followed by --resume --joblog
5 49
### Test --header
2015-01-03 17:57:37 +00:00
printf "a\tb\n1.2\t3/4.5" | parallel --colsep "\t" --header "\n" echo {b} {a} {b.} {b/} {b//} {b/.}
2013-03-23 20:39:48 +00:00
3/4.5 1.2 3/4 4.5 3 4
2015-01-03 17:57:37 +00:00
echo '### 64-bit wierdness - this did not complete on a 64-bit machine'; seq 1 2 | parallel -j1 'seq 1 1 | parallel true'
2013-03-23 20:39:48 +00:00
### 64-bit wierdness - this did not complete on a 64-bit machine
2015-01-03 17:57:37 +00:00
echo "### BUG-fix: bash -c 'parallel -a <(seq 1 3) echo'"
2013-03-23 20:39:48 +00:00
### BUG-fix: bash -c 'parallel -a <(seq 1 3) echo'
2015-01-03 17:57:37 +00:00
stdout bash -c 'parallel -k -a <(seq 1 3) echo'
2013-03-23 20:39:48 +00:00
1
2
3
2015-01-03 17:57:37 +00:00
echo "### bug #35268: shell_quote doesn't treats [] brackets correctly"
2013-03-23 20:39:48 +00:00
### bug #35268: shell_quote doesn't treats [] brackets correctly
2015-02-01 15:57:31 +00:00
touch /tmp/foo1; stdout parallel echo ::: '/tmp/foo[123]'; rm /tmp/foo1
2013-03-23 20:39:48 +00:00
/tmp/foo[123]
2014-07-15 00:40:38 +00:00
echo '### Test make .deb package'; cd ~/privat/parallel/packager/debian; stdout make | grep 'To install the GNU Parallel Debian package, run:'
2013-03-23 20:39:48 +00:00
### Test make .deb package
To install the GNU Parallel Debian package, run:
2014-07-15 00:40:38 +00:00
echo '### Test of segfaulting issue'
2013-03-23 20:39:48 +00:00
### Test of segfaulting issue
2014-07-15 00:40:38 +00:00
echo 'This gave /home/tange/bin/stdout: line 3: 20374 Segmentation fault "$@" 2>&1'; echo 'before adding wait() before exit'; seq 1 300 | stdout parallel ./trysegfault
2013-03-23 20:39:48 +00:00
This gave /home/tange/bin/stdout: line 3: 20374 Segmentation fault "$@" 2>&1
before adding wait() before exit
2015-01-03 17:57:37 +00:00
echo '### Test basic --arg-sep'
2013-03-23 20:39:48 +00:00
### Test basic --arg-sep
2015-01-03 17:57:37 +00:00
parallel -k echo ::: a b
2013-03-23 20:39:48 +00:00
a
b
2015-01-03 17:57:37 +00:00
echo '### Run commands using --arg-sep'
2013-03-23 20:39:48 +00:00
### Run commands using --arg-sep
2015-01-03 17:57:37 +00:00
parallel -kv ::: 'echo a' 'echo b'
2013-03-23 20:39:48 +00:00
echo a
a
echo b
b
2015-01-03 17:57:37 +00:00
echo '### Change --arg-sep'
2013-03-23 20:39:48 +00:00
### Change --arg-sep
2015-01-03 17:57:37 +00:00
parallel --arg-sep ::: -kv ::: 'echo a' 'echo b'
2013-03-23 20:39:48 +00:00
echo a
a
echo b
b
2015-01-03 17:57:37 +00:00
parallel --arg-sep .--- -kv .--- 'echo a' 'echo b'
2013-03-23 20:39:48 +00:00
echo a
a
echo b
b
2015-01-03 17:57:37 +00:00
parallel --argsep ::: -kv ::: 'echo a' 'echo b'
2013-03-23 20:39:48 +00:00
echo a
a
echo b
b
2015-01-03 17:57:37 +00:00
parallel --argsep .--- -kv .--- 'echo a' 'echo b'
2013-03-23 20:39:48 +00:00
echo a
a
echo b
b
2014-07-15 00:40:38 +00:00
echo '### Test stdin goes to first command only'
2013-03-23 20:39:48 +00:00
### Test stdin goes to first command only
2014-07-15 00:40:38 +00:00
echo via cat |parallel --arg-sep .--- -kv .--- 'cat' 'echo b'
2013-03-23 20:39:48 +00:00
cat
via cat
echo b
b
2014-07-15 00:40:38 +00:00
echo via cat |parallel -kv ::: 'cat' 'echo b'
2013-03-23 20:39:48 +00:00
cat
via cat
echo b
b
2015-01-03 17:57:37 +00:00
echo '### Bug made 4 5 go before 1 2 3'
2013-03-23 20:39:48 +00:00
### Bug made 4 5 go before 1 2 3
2015-01-03 17:57:37 +00:00
parallel -k ::: "sleep 1; echo 1" "echo 2" "echo 3" "echo 4" "echo 5"
2013-03-23 20:39:48 +00:00
1
2
3
4
5
2015-01-03 17:57:37 +00:00
echo '### Bug made 3 go before 1 2'
2013-03-23 20:39:48 +00:00
### Bug made 3 go before 1 2
2015-01-03 17:57:37 +00:00
parallel -kj 1 ::: "sleep 1; echo 1" "echo 2" "echo 3"
2013-03-23 20:39:48 +00:00
1
2
3
2015-01-03 17:57:37 +00:00
echo '### Bug did not quote'
2013-03-23 20:39:48 +00:00
### Bug did not quote
2015-01-03 17:57:37 +00:00
echo '>' | parallel -v echo
2013-03-23 20:39:48 +00:00
echo \>
>
2015-01-03 17:57:37 +00:00
parallel -v echo ::: '>'
2013-03-23 20:39:48 +00:00
echo \>
>
2015-01-03 17:57:37 +00:00
(echo '>'; echo 2) | parallel -j1 -vX echo
2013-03-23 20:39:48 +00:00
echo \> 2
> 2
2015-01-03 17:57:37 +00:00
parallel -X -j1 echo ::: '>' 2
2013-03-23 20:39:48 +00:00
> 2
2015-01-03 17:57:37 +00:00
echo '### Must not quote'; echo 'echo | wc -l' | parallel -v
2013-03-23 20:39:48 +00:00
### Must not quote
echo | wc -l
1
2015-01-03 17:57:37 +00:00
parallel -v ::: 'echo | wc -l'
2013-03-23 20:39:48 +00:00
echo | wc -l
1
2015-01-03 17:57:37 +00:00
echo 'echo a b c | wc -w' | parallel -v
2013-03-23 20:39:48 +00:00
echo a b c | wc -w
3
2015-01-03 17:57:37 +00:00
parallel -kv ::: 'echo a b c | wc -w' 'echo a b | wc -w'
2013-03-23 20:39:48 +00:00
echo a b c | wc -w
3
echo a b | wc -w
2
2014-07-15 00:40:38 +00:00
echo '### Test bug #35820: sem breaks if $HOME is not writable'
2012-05-13 14:03:13 +00:00
### Test bug #35820: sem breaks if $HOME is not writable
2014-07-15 00:40:38 +00:00
echo 'Workaround: use another writable dir'; rm -rf /tmp/.parallel; HOME=/tmp sem echo OK; HOME=/tmp sem --wait; HOME=/usr/this/should/fail stdout sem echo should fail
2012-05-13 14:03:13 +00:00
Workaround: use another writable dir
OK
2012-08-08 16:38:29 +00:00
parallel: Error: Cannot write to /usr/this/should/fail/.parallel: No such file or directory