mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 05:07:54 +00:00
162 lines
4.5 KiB
Plaintext
162 lines
4.5 KiB
Plaintext
echo '### bug #42329: --line-buffer gives wrong output'; $NICEPAR --line-buffer --tag seq ::: 10000000 | wc -c; $NICEPAR --line-buffer seq ::: 10000000 | wc -c
|
|
### bug #42329: --line-buffer gives wrong output
|
|
168888897
|
|
78888897
|
|
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
|
|
### Test \0 as recend
|
|
a^@
|
|
b^@
|
|
c^@
|
|
^@a
|
|
^@b
|
|
^@c
|
|
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
|
|
### Test filenames containing UTF-8
|
|
.
|
|
./1-col.txt
|
|
./2-col.txt
|
|
./a
|
|
./a/bar
|
|
./a/foo
|
|
./a/foo2
|
|
./b
|
|
./b/bar
|
|
./b/foo
|
|
./中国 (Zhōngguó)
|
|
./中国 (Zhōngguó)/China's (中国) road.jpg
|
|
./中国 (Zhōngguó)/thumb_China's (中国) road.jpg
|
|
### 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
|
|
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
|
|
### 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
|
|
A last AB last BC last Cecho
|
|
|
|
echo '### test round-robin'; nice seq 1000 | $NICEPAR --block 1k --pipe --round-robin wc | sort
|
|
### test round-robin
|
|
223 223 893
|
|
250 250 1000
|
|
250 250 1000
|
|
277 277 1000
|
|
echo '### --version must have higher priority than retired options'
|
|
### --version must have higher priority than retired options
|
|
$NICEPAR --version -g -Y -U -W -T | tail
|
|
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.
|
|
GNU parallel comes with no warranty.
|
|
|
|
Web site: http://www.gnu.org/software/parallel
|
|
|
|
When using programs that use GNU Parallel to process data for publication please cite:
|
|
|
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
;login: The USENIX Magazine, February 2011:42-47.
|
|
echo '### bug #39787: --xargs broken'
|
|
### bug #39787: --xargs broken
|
|
nice perl -e 'for(1..30000){print "$_\n"}' | $NICEPAR --xargs -k echo | perl -ne 'print length $_,"\n"'
|
|
131064
|
|
37830
|
|
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"'
|
|
OK
|
|
stdout /usr/bin/time -f %e parallel --delay 3 true ::: 1 2 3 | perl -ne '$_ >= 6 and $_ <= 11 and print "OK\n"'
|
|
OK
|
|
echo '### Exit value should not be affected if an earlier job times out'
|
|
### Exit value should not be affected if an earlier job times out
|
|
$NICEPAR -j2 --timeout 1 --joblog - -k ::: "sleep 10" "exit 255" | field 7
|
|
Exitval
|
|
-1
|
|
255
|
|
echo '### --header regexp'
|
|
### --header regexp
|
|
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --header '(%.*\n)*' echo JOB{#}\;cat
|
|
JOB1
|
|
%head1
|
|
%head2
|
|
1
|
|
2
|
|
JOB2
|
|
%head1
|
|
%head2
|
|
3
|
|
4
|
|
JOB3
|
|
%head1
|
|
%head2
|
|
5
|
|
echo '### --header num'
|
|
### --header num
|
|
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --header 2 echo JOB{#}\;cat
|
|
JOB1
|
|
%head1
|
|
%head2
|
|
1
|
|
2
|
|
JOB2
|
|
%head1
|
|
%head2
|
|
3
|
|
4
|
|
JOB3
|
|
%head1
|
|
%head2
|
|
5
|
|
echo '### --header regexp --round-robin'
|
|
### --header regexp --round-robin
|
|
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --round --header '(%.*\n)*' echo JOB\;wc | sort
|
|
4 4 18
|
|
5 5 20
|
|
JOB
|
|
JOB
|
|
echo '### --header num --round-robin'
|
|
### --header num --round-robin
|
|
(echo %head1; echo %head2; seq 5) | $NICEPAR -kj2 --pipe -N2 --round --header 2 echo JOB{#}\;wc | sort
|
|
4 4 18
|
|
5 5 20
|
|
JOB1
|
|
JOB2
|
|
echo '### shebang-wrap'
|
|
### shebang-wrap
|
|
$NICEPAR -k {} {} A B C ::: ./input-files/shebang/shebangwrap.*[^~]
|
|
./input-files/shebang/shebangwrap.oct
|
|
A
|
|
B
|
|
C
|
|
./input-files/shebang/shebangwrap.pl
|
|
A
|
|
B
|
|
C
|
|
./input-files/shebang/shebangwrap.py
|
|
A
|
|
B
|
|
C
|
|
[1] "./input-files/shebang/shebangwrap.r"
|
|
[1] "A"
|
|
[1] "B"
|
|
[1] "C"
|
|
["./input-files/shebang/shebangwrap.rb"]
|
|
["A"]
|
|
["B"]
|
|
["C"]
|
|
./input-files/shebang/shebangwrap.sh
|
|
A
|
|
B
|
|
C
|
|
./input-files/shebang/shebangwrap.gp
|
|
A
|
|
B
|
|
C
|