2014-08-22 21:30:39 +00:00
echo '### bug #42329: --line-buffer gives wrong output'; $NICEPAR --line-buffer --tag seq ::: 10000000 | wc -c; $NICEPAR --line-buffer seq ::: 10000000 | wc -c
2014-05-12 07:27:28 +00:00
### bug #42329: --line-buffer gives wrong output
168888897
78888897
2014-08-22 21:30:39 +00:00
echo '### Test \0 as recend'; printf "a\0b\0c\0" | $NICEPAR --recend '\0' -k -N1 --pipe cat -v \; echo; printf "\0a\0b\0c" | $NICEPAR --recstart '\0' -k -N1 --pipe cat -v \; echo
2014-05-03 22:42:52 +00:00
### Test \0 as recend
a^@
b^@
c^@
^@a
^@b
^@c
2014-08-22 21:30:39 +00:00
echo '### Test filenames containing UTF-8'; cd tmp; find . -name '*.jpg' | $NICEPAR -j +0 convert -geometry 120 {} {//}/thumb_{/}; find |grep -v CVS | sort; echo '### bug #39554: Feature request: line buffered output'; parallel -j0 --linebuffer 'echo -n start {};sleep 0.{#};echo middle -n {};sleep 1.{#}5;echo next to last {};sleep 1.{#};echo -n last {}' ::: A B C
2010-06-16 03:03:52 +00:00
### Test filenames containing UTF-8
2007-09-10 20:28:03 +00:00
.
2010-06-16 03:03:52 +00:00
./1-col.txt
./2-col.txt
2007-09-10 20:28:03 +00:00
./a
./a/bar
2009-02-17 03:58:13 +00:00
./a/foo
2010-06-16 03:03:52 +00:00
./a/foo2
2007-09-10 20:28:03 +00:00
./b
./b/bar
2009-02-17 03:58:13 +00:00
./b/foo
./中国 (Zhōngguó)
./中国 (Zhōngguó)/China's (中国) road.jpg
./中国 (Zhōngguó)/thumb_China's (中国) road.jpg
2013-07-30 21:15:40 +00:00
### bug #39554: Feature request: line buffered output
start Amiddle -n A
start Bmiddle -n B
start Cmiddle -n C
next to last A
next to last B
next to last C
2014-07-15 00:40:38 +00:00
last Alast Blast Cecho
echo '### bug #39554: Feature request: line buffered output --tag'; parallel --tag -j0 --linebuffer 'echo -n start {};sleep 0.{#};echo middle -n {};sleep 1.{#}5;echo next to last {};sleep 1.{#};echo -n last {}' ::: A B C
2013-07-30 21:15:40 +00:00
### bug #39554: Feature request: line buffered output --tag
A start Amiddle -n A
B start Bmiddle -n B
C start Cmiddle -n C
A next to last A
B next to last B
C next to last C
2014-07-15 00:40:38 +00:00
A last AB last BC last Cecho
2015-07-22 06:28:05 +00:00
echo '### test round-robin'; nice seq 1000 | $NICEPAR -j4 --block 1k --pipe --round-robin wc | sort
2013-08-14 18:11:00 +00:00
### test round-robin
2013-11-22 17:24:09 +00:00
223 223 893
250 250 1000
250 250 1000
277 277 1000
2014-11-13 16:03:36 +00:00
echo '### bug #43600: --pipe --linebuffer --round does not work'
### bug #43600: --pipe --linebuffer --round does not work
2016-08-03 21:45:13 +00:00
seq 10000000000 | parallel --pipe --linebuffer --round cat | head | wc -l
2014-11-13 16:03:36 +00:00
10
2014-11-14 00:00:56 +00:00
echo '### Check that 4 processes are really used'
### Check that 4 processes are really used
2016-08-03 21:45:13 +00:00
seq 1000000 | parallel -j4 --pipe --round --line-buf wc | wc -l
4
2014-07-15 00:40:38 +00:00
echo '### --version must have higher priority than retired options'
2013-08-14 18:11:00 +00:00
### --version must have higher priority than retired options
2014-08-22 21:30:39 +00:00
$NICEPAR --version -g -Y -U -W -T | tail
2018-11-25 18:06:06 +00:00
GNU parallel 20181124
2018-09-20 22:15:14 +00:00
Copyright (C) 2007-2018 Ole Tange and Free Software Foundation, Inc.
2014-12-26 10:44:02 +00:00
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
2013-08-14 18:11:00 +00:00
GNU parallel comes with no warranty.
Web site: http://www.gnu.org/software/parallel
2014-12-26 10:44:02 +00:00
When using programs that use GNU Parallel to process data for publication
2016-04-11 20:19:28 +00:00
please cite as described in 'parallel --citation'.
2014-07-15 00:40:38 +00:00
echo '### bug #39787: --xargs broken'
2013-08-15 17:38:39 +00:00
### bug #39787: --xargs broken
2014-08-22 21:30:39 +00:00
nice perl -e 'for(1..30000){print "$_\n"}' | $NICEPAR --xargs -k echo | perl -ne 'print length $_,"\n"'
2018-03-21 21:57:28 +00:00
131040
37854
2014-08-22 21:30:39 +00:00
echo '### --delay should grow by 3 sec per arg'
### --delay should grow by 3 sec per arg
stdout /usr/bin/time -f %e parallel --delay 3 true ::: 1 2 | perl -ne '$_ >= 3 and $_ <= 8 and print "OK\n"'
2013-08-15 17:38:39 +00:00
OK
2014-08-22 21:30:39 +00:00
stdout /usr/bin/time -f %e parallel --delay 3 true ::: 1 2 3 | perl -ne '$_ >= 6 and $_ <= 11 and print "OK\n"'
2013-08-15 17:38:39 +00:00
OK
2014-07-15 00:40:38 +00:00
echo '### Exit value should not be affected if an earlier job times out'
2013-08-16 11:11:35 +00:00
### Exit value should not be affected if an earlier job times out
2014-08-22 21:30:39 +00:00
$NICEPAR -j2 --timeout 1 --joblog - -k ::: "sleep 10" "exit 255" | field 7
2013-08-16 11:11:35 +00:00
Exitval
-1
255
2018-03-21 21:57:28 +00:00
parallel: Warning: This job was killed because it timed out:
parallel: Warning: sleep 10
2014-07-15 00:40:38 +00:00
echo '### --header regexp'
2013-08-17 16:24:51 +00:00
### --header regexp
2014-08-22 21:30:39 +00:00
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --header '(%.*\n)*' echo JOB{#}\;cat
2013-08-17 16:24:51 +00:00
JOB1
%head1
%head2
1
2
JOB2
%head1
%head2
3
4
JOB3
%head1
%head2
5
2014-07-15 00:40:38 +00:00
echo '### --header num'
2013-08-17 16:24:51 +00:00
### --header num
2014-08-22 21:30:39 +00:00
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --header 2 echo JOB{#}\;cat
2013-08-17 16:24:51 +00:00
JOB1
%head1
%head2
1
2
JOB2
%head1
%head2
3
4
JOB3
%head1
%head2
5
2014-07-15 00:40:38 +00:00
echo '### --header regexp --round-robin'
2013-08-17 16:24:51 +00:00
### --header regexp --round-robin
2014-08-22 21:30:39 +00:00
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --round --header '(%.*\n)*' echo JOB\;wc | sort
2013-08-19 09:15:39 +00:00
4 4 18
5 5 20
JOB
JOB
2014-07-15 00:40:38 +00:00
echo '### --header num --round-robin'
2013-08-17 16:24:51 +00:00
### --header num --round-robin
2014-08-22 21:30:39 +00:00
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --round --header 2 echo JOB{#}\;wc | sort
2013-08-19 09:15:39 +00:00
4 4 18
5 5 20
2013-08-17 16:24:51 +00:00
JOB1
JOB2
2014-07-15 00:40:38 +00:00
echo '### shebang-wrap'
2013-08-19 09:15:39 +00:00
### shebang-wrap
2014-08-22 21:30:39 +00:00
$NICEPAR -k {} {} A B C ::: ./input-files/shebang/shebangwrap.*[^~]
2014-06-23 00:04:37 +00:00
./input-files/shebang/shebangwrap.oct
2013-08-19 09:15:39 +00:00
A
B
C
2014-06-23 00:04:37 +00:00
./input-files/shebang/shebangwrap.pl
2013-08-19 09:15:39 +00:00
A
B
C
2014-06-23 00:04:37 +00:00
./input-files/shebang/shebangwrap.py
2013-08-19 09:15:39 +00:00
A
B
C
2014-06-23 00:04:37 +00:00
[1] "./input-files/shebang/shebangwrap.r"
2013-08-19 09:15:39 +00:00
[1] "A"
[1] "B"
[1] "C"
2014-06-23 00:04:37 +00:00
["./input-files/shebang/shebangwrap.rb"]
2013-08-19 09:15:39 +00:00
["A"]
["B"]
["C"]
2014-06-23 00:04:37 +00:00
./input-files/shebang/shebangwrap.sh
2013-08-19 09:15:39 +00:00
A
B
C
2014-06-23 00:04:37 +00:00
./input-files/shebang/shebangwrap.gp
2013-08-19 09:15:39 +00:00
A
B
C
2015-01-18 21:09:30 +00:00
echo 'bug #43967: Error if there exists a bin/zsh or bin/bash dir (with zsh or bash).'
bug #43967: Error if there exists a bin/zsh or bin/bash dir (with zsh or bash).
mkdir -p /tmp/bash$$/bash; PATH=/tmp/bash$$:$PATH parallel echo ::: OK; rm -rf /tmp/bash$$
OK