mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 07:57:58 +00:00
Reorg of testsuite.
This commit is contained in:
parent
1371108e64
commit
b35e5ff721
|
@ -171,13 +171,22 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
|
||||||
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
|
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
|
||||||
Jesse Alama <jesse.alama@gmail.com>
|
Jesse Alama <jesse.alama@gmail.com>
|
||||||
|
|
||||||
Subject: GNU Parallel 20120522 ('') released
|
Subject: GNU Parallel 20120522 ('Holande/40year') released
|
||||||
|
|
||||||
GNU Parallel 20120522 ('') has been released. It is
|
GNU Parallel 20120522 ('') has been released. It is
|
||||||
available for download at: http://ftp.gnu.org/gnu/parallel/
|
available for download at: http://ftp.gnu.org/gnu/parallel/
|
||||||
|
|
||||||
New in this release:
|
New in this release:
|
||||||
|
|
||||||
|
* Package for AIX.
|
||||||
|
http://www.perzl.org/aix/index.php?n=Main.Parallel
|
||||||
|
|
||||||
|
* GNU Parallel was presented at MUUG.
|
||||||
|
http://muug.mb.ca/blog/meetings/2012/05/09/may-8th-2012-rtfm-gnu-parallel1/
|
||||||
|
|
||||||
|
* Blog post: Manipulating many or large files with GNU parallel.
|
||||||
|
http://compbiously.blogspot.com/2012/05/manipulating-many-or-large-files-with.html
|
||||||
|
|
||||||
* Blog post: Running commands in parallel using bash.
|
* Blog post: Running commands in parallel using bash.
|
||||||
http://blog.michaelboman.org/2012/04/running-commands-in-parallel-using-bash.html
|
http://blog.michaelboman.org/2012/04/running-commands-in-parallel-using-bash.html
|
||||||
|
|
||||||
|
|
|
@ -1395,8 +1395,9 @@ a bc " -> "a bc". This is the default if @strong{--colsep} is used.
|
||||||
@anchor{@strong{-u}}
|
@anchor{@strong{-u}}
|
||||||
|
|
||||||
Ungroup output. Output is printed as soon as possible and by passes
|
Ungroup output. Output is printed as soon as possible and by passes
|
||||||
GNU @strong{parallel} internal processing. This may cause
|
GNU @strong{parallel} internal processing. This may cause output from
|
||||||
output from different commands to be mixed. Compare these:
|
different commands to be mixed thus should only be used if you do not
|
||||||
|
care about the output. Compare these:
|
||||||
|
|
||||||
@strong{parallel -j0 'sleep @{@};echo -n start@{@};sleep @{@};echo @{@}end' ::: 1 2 3 4}
|
@strong{parallel -j0 'sleep @{@};echo -n start@{@};sleep @{@};echo @{@}end' ::: 1 2 3 4}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test --number-of-cpus'
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1
|
||||||
parallel --number-of-cpus
|
EOF
|
||||||
|
|
||||||
echo '### Test --number-of-cores'
|
|
||||||
parallel --number-of-cores
|
|
||||||
|
|
||||||
echo '### Test --use-cpus-instead-of-cores'
|
|
||||||
(seq 1 4 | stdout parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done &
|
|
||||||
(seq 1 4 | stdout parallel -j100% sleep) && echo cores done &
|
|
||||||
echo 'Cores should complete first on machines with less than 4 physical CPUs'
|
|
||||||
wait
|
|
||||||
|
|
||||||
echo '### Test --tag ::: a ::: b'
|
|
||||||
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a ::: b
|
|
||||||
|
|
||||||
echo '### Test --tag ::: a b'
|
|
||||||
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
|
||||||
|
|
||||||
echo '### Test --tag -X ::: a b'
|
|
||||||
stdout parallel -k --tag -X -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
|
||||||
|
|
||||||
echo '### Test bash redirection <()'
|
|
||||||
parallel 'cat <(echo {}); echo b' ::: a
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
echo '### Tests from xargs'
|
echo '### Tests from xargs'
|
||||||
# Largely untested
|
|
||||||
|
|
||||||
rsync -Ha --delete input-files/xargs-inputs/ tmp/
|
rsync -Ha --delete input-files/xargs-inputs/ tmp/
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
|
@ -1,62 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
# Tests that failed for OO-rewrite
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1
|
||||||
|
EOF
|
||||||
parallel -u --semaphore seq 1 10 '|' pv -qL 20
|
|
||||||
sem --wait; echo done
|
|
||||||
|
|
||||||
|
|
||||||
echo a | parallel echo {1}
|
|
||||||
|
|
||||||
echo "echo a" | parallel
|
|
||||||
|
|
||||||
parallel -j1 -I :: -X echo 'a::b::^c::[.}c' ::: 1
|
|
||||||
|
|
||||||
echo "### BUG: The length for -X is not close to max (131072)"
|
|
||||||
seq 1 4000 | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
|
||||||
|
|
||||||
echo "### BUG: empty lines with --show-limit"
|
|
||||||
echo | parallel --show-limits
|
|
||||||
|
|
||||||
echo '### Test -N'
|
|
||||||
seq 1 5 | parallel -kN3 echo {1} {2} {3}
|
|
||||||
|
|
||||||
echo '### Test --arg-file-sep with files of different lengths'
|
|
||||||
parallel --xapply --arg-file-sep :::: -k echo {1} {2} :::: <(seq 1 1) <(seq 3 4)
|
|
||||||
|
|
||||||
echo '### Test respect -s'
|
|
||||||
parallel -kvm -IARG -s15 echo ARG ::: 1 22 333 4444 55555 666666 7777777 88888888 999999999
|
|
||||||
|
|
||||||
echo '### Test eof string after :::'
|
|
||||||
parallel -k -E ole echo ::: foo ole bar
|
|
||||||
|
|
||||||
echo '### Test -C and --trim rl'
|
|
||||||
parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"' ::: 'a% c %%b' 'a%c% b %d'
|
|
||||||
|
|
||||||
echo '### Test empty input'
|
|
||||||
</dev/null parallel -j +0 echo
|
|
||||||
|
|
||||||
echo '### Test -m'
|
|
||||||
seq 1 2 | parallel -k -m echo
|
|
||||||
|
|
||||||
echo '### Test :::'
|
|
||||||
parallel echo ::: 1
|
|
||||||
|
|
||||||
echo '### Test context_replace'
|
|
||||||
echo a | parallel -qX echo "'"{}"' "
|
|
||||||
|
|
||||||
echo '### Test -N2 {2}'
|
|
||||||
seq 1 4 | parallel -kN2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
|
|
||||||
|
|
||||||
echo '### Test -E (should only output foo ole)'
|
|
||||||
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 -E bar echo
|
|
||||||
parallel -kr -L2 -E bar echo ::: foo '' 'ole ' bar quux
|
|
||||||
|
|
||||||
echo '### Test -r (should only output foo ole bar\nquux)'
|
|
||||||
parallel -kr -L2 echo ::: foo '' 'ole ' bar quux
|
|
||||||
|
|
||||||
echo '### Test of tab as colsep'
|
|
||||||
printf 'def\tabc\njkl\tghi' | parallel -k --colsep '\t' echo {2} {1}
|
|
||||||
parallel -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
|
|
||||||
|
|
||||||
|
|
|
@ -1,54 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test ::::'
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j3 -k -L1
|
||||||
echo '### Change --arg-file-sep'
|
EOF
|
||||||
parallel --xapply --arg-file-sep :::: -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
|
||||||
parallel --xapply --arg-file-sep .--- -k echo {1} {2} .--- <(seq 1 10) <(seq 5 15)
|
|
||||||
parallel --xapply --argfilesep :::: -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
|
||||||
parallel --xapply --argfilesep .--- -k echo {1} {2} .--- <(seq 1 10) <(seq 5 15)
|
|
||||||
|
|
||||||
echo '### Test xapply --max-replace-args'
|
|
||||||
seq 0 7 | parallel --xapply -k --max-replace-args=3 echo {3} {2} {1}
|
|
||||||
echo '### Test -N'
|
|
||||||
seq 1 5 | parallel --xapply -kN3 echo {1} {2} {3}
|
|
||||||
echo '### Test -N with 0'
|
|
||||||
seq 0 7 | parallel --xapply -kN3 echo {1} {2} {3}
|
|
||||||
echo '### Test :::: on nonexistent'
|
|
||||||
stdout parallel --xapply -k echo {1} {2} {3} :::: nonexistent
|
|
||||||
echo '### Test :::: two files'
|
|
||||||
parallel --xapply -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
|
||||||
echo '### Test -d, ::::'
|
|
||||||
parallel --xapply -kd, 'echo a{1} {2}b' :::: <(echo 1,2,3,) <(echo 5,6,7,8)
|
|
||||||
echo '### Test -d, :::: one file too much'
|
|
||||||
parallel --xapply -kd, echo 'a{1}' '{2}b' :::: <(echo 1,2,3,) <(echo 5,6,7,8) <(echo 9,0)
|
|
||||||
echo '### Bug: did not quote'
|
|
||||||
parallel --xapply echo {1} {2} :::: <(echo '>') <(echo b)
|
|
||||||
echo '### Quote test triplet 1'
|
|
||||||
parallel --xapply -kv :::: <(echo 'echo a'; echo 'echo b')
|
|
||||||
parallel --xapply -kv -a <(echo 'echo a'; echo 'echo b')
|
|
||||||
(echo 'echo a'; echo 'echo b') | parallel --xapply -kv
|
|
||||||
echo '### Quote test triplet 2'
|
|
||||||
parallel --xapply -kv echo :::: <(echo 'echo a'; echo 'echo b')
|
|
||||||
parallel --xapply -kv -a <(echo 'echo a'; echo 'echo b') echo
|
|
||||||
(echo 'echo a'; echo 'echo b') | parallel --xapply -kv echo
|
|
||||||
echo '### Quoting if there is a command and 2 arg files'
|
|
||||||
parallel --xapply -kv echo :::: <(echo 'echo a') <(echo 'echo b')
|
|
||||||
echo '### Quoting if there is a command and 2 arg files of uneven length'
|
|
||||||
parallel --xapply -kv echo :::: <(echo 'echo a';echo a1) <(echo 'echo b')
|
|
||||||
echo '### Quoting if there is no command and 2 arg files'
|
|
||||||
parallel --xapply -kv :::: <(echo 'echo a') <(echo 'echo b')
|
|
||||||
echo '### Quoting if there is no command and 2 arg files of uneven length'
|
|
||||||
parallel --xapply -kv :::: <(echo 'echo a';echo echo a1) <(echo 'echo b')
|
|
||||||
|
|
||||||
echo '### Test multiple -a'
|
|
||||||
parallel --xapply -kv -a <(echo a) -a <(echo b) echo {2} {1}
|
|
||||||
parallel --xapply -kv echo {2} {1} :::: <(echo a) <(echo b)
|
|
||||||
echo '### Multiple -a: An unused file'
|
|
||||||
parallel --xapply -kv -a <(echo a) -a <(echo b) -a <(echo c) echo {2} {1}
|
|
||||||
parallel --xapply -kv echo {2} {1} :::: <(echo a) <(echo b) <(echo c)
|
|
||||||
echo '### Multiple -a: nonexistent'
|
|
||||||
stdout parallel --xapply -kv echo {2} {1} :::: nonexist nonexist2
|
|
||||||
stdout parallel --xapply -kv -a nonexist -a nonexist2 echo {2} {1}
|
|
||||||
|
|
||||||
echo '### Test {#.}'
|
|
||||||
parallel --xapply -kv -a <(echo a-noext) -a <(echo b-withext.extension) -a <(echo c-ext.gif) echo {3.} {2.} {1.}
|
|
||||||
|
|
|
@ -1,42 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test bug https://savannah.gnu.org/bugs/index.php?33352'
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1
|
||||||
|
EOF
|
||||||
# produce input slowly to parallel so that it will reap a process
|
|
||||||
# while blocking in read()
|
|
||||||
|
|
||||||
# Having found the solution it is suddenly very easy to reproduce the
|
|
||||||
# problem - even on other hardware:
|
|
||||||
#
|
|
||||||
# perl -e '@x=1 .. 17000; for(1..30) { print "@x\n"}' | pv -qL 200000
|
|
||||||
# |parallel -j2 --pipe --keeporder --block 150000 cat | md5sum
|
|
||||||
#
|
|
||||||
# This gives different md5sums for each run.
|
|
||||||
#
|
|
||||||
# The problem is that read(STDIN) is being interrupted by a dead
|
|
||||||
# child. The chance of this happening is very small if there are few
|
|
||||||
# children dying or read(STDIN) never has to wait for data.
|
|
||||||
#
|
|
||||||
# The test above forces data to arrive slowly (using pv) which causes
|
|
||||||
# read(STDIN) to take a long time - thus being interrupted by a dead
|
|
||||||
# child.
|
|
||||||
|
|
||||||
MD5=md5sum
|
|
||||||
PAR="parallel -j2 --pipe --keeporder --block 150000 --tmpdir=/dev/shm"
|
|
||||||
perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | md5sum
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR cat | md5sum &
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR --recend '' cat | md5sum &
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR --recend '' --files cat | parallel -Xj1 cat {} ';' rm {} | md5sum &
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR --recend '' --files cat | parallel -Xj1 cat {} ';' rm {} | md5sum &
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR --recend '' --files --tmpdir /dev/shm cat | parallel -Xj1 cat {} ';' rm {} | md5sum &
|
|
||||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
|
||||||
$PAR --recend '' --files --halt-on-error 2 cat | parallel -Xj1 cat {} ';' rm {} | md5sum &
|
|
||||||
wait
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test of -j filename'
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1
|
||||||
stdout parallel -j no_such_file echo ::: 1
|
EOF
|
||||||
|
|
||||||
echo '### Test of -j filename'
|
|
||||||
echo 3 >/tmp/jobs_to_run
|
|
||||||
parallel -j /tmp/jobs_to_run -v sleep 0.{} ::: 9 8 7 6 4
|
|
||||||
# Should give 7 8 9 4 6
|
|
||||||
|
|
||||||
echo '### Test of -j filename with file content changing'
|
|
||||||
(echo 1 >/tmp/jobs_to_run; sleep 3; echo 10 >/tmp/jobs_to_run) &
|
|
||||||
parallel -j /tmp/jobs_to_run -v sleep {} ::: 3.3 1.1 1.3 1.4 1.2 1 1 1 1 1 1 1 1 1 1 1
|
|
||||||
|
|
|
@ -1,34 +1,219 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo '### Test --spreadstdin - more procs than args'
|
PAR="nice nice parallel -j2 --pipe --keeporder --block 150000 --tmpdir=/dev/shm"
|
||||||
rm -f /tmp/parallel.ss.*
|
export PAR
|
||||||
seq 1 5 | stdout parallel -j 10 --spreadstdin 'cat >/tmp/parallel.ss.$PARALLEL_SEQ' >/dev/null
|
XAP="nice nice parallel --xapply"
|
||||||
cat /tmp/parallel.ss.*
|
export XAP
|
||||||
|
|
||||||
echo '### Test --spreadstdin - more args than procs'
|
cat <<'EOF' | sed -e 's/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1
|
||||||
rm /tmp/parallel.ss.*
|
echo '### Test --spreadstdin - more procs than args';
|
||||||
seq 1 10 | stdout parallel -j 5 --spreadstdin 'cat >/tmp/parallel.ss.$PARALLEL_SEQ' >/dev/null
|
rm -f /tmp/parallel.ss.*;
|
||||||
cat /tmp/parallel.ss.*
|
seq 1 5 | stdout parallel -j 10 --spreadstdin 'cat >/tmp/parallel.ss.$PARALLEL_SEQ' >/dev/null;
|
||||||
|
cat /tmp/parallel.ss.*;
|
||||||
|
|
||||||
seq 1 1000 | parallel -j1 --spreadstdin cat "|cat "|wc -c
|
echo '### Test --spreadstdin - more args than procs';
|
||||||
seq 1 10000 | parallel -j10 --spreadstdin cat "|cat "|wc -c
|
rm /tmp/parallel.ss2.*;
|
||||||
seq 1 100000 | parallel -j1 --spreadstdin cat "|cat "|wc -c
|
seq 1 10 | stdout parallel -j 5 --spreadstdin 'cat >/tmp/parallel.ss2.$PARALLEL_SEQ' >/dev/null;
|
||||||
seq 1 1000000 | parallel -j10 --spreadstdin cat "|cat "|wc -c
|
cat /tmp/parallel.ss2.*
|
||||||
|
|
||||||
|
nice nice seq 1 1000 | nice nice parallel -j1 --spreadstdin cat "|cat "|wc -c
|
||||||
|
nice nice seq 1 10000 | nice nice parallel -j10 --spreadstdin cat "|cat "|wc -c
|
||||||
|
nice nice seq 1 100000 | nice nice parallel -j1 --spreadstdin cat "|cat "|wc -c
|
||||||
|
nice nice seq 1 1000000 | nice nice parallel -j10 --spreadstdin cat "|cat "|wc -c
|
||||||
|
|
||||||
seq 1 10 | parallel --recend "\n" -j1 --spreadstdin gzip -9 >/tmp/foo.gz
|
seq 1 10 | parallel --recend "\n" -j1 --spreadstdin gzip -9 >/tmp/foo.gz
|
||||||
|
|
||||||
echo '### Test --spreadstdin - similar to the failing below'
|
echo '### Test --spreadstdin - similar to the failing below';
|
||||||
seq 1 100000 | parallel --recend "\n" -j10 --spreadstdin gzip -9 >/tmp/foo.gz
|
nice seq 1 100000 | nice nice parallel --recend "\n" -j10 --spreadstdin gzip -9 >/tmp/foo2.gz;
|
||||||
diff <(seq 1 100000) <(zcat /tmp/foo.gz |sort -n)
|
diff <(nice seq 1 100000) <(zcat /tmp/foo2.gz |sort -n);
|
||||||
diff <(seq 1 100000|wc -c) <(zcat /tmp/foo.gz |wc -c)
|
diff <(nice seq 1 100000|wc -c) <(zcat /tmp/foo2.gz |wc -c)
|
||||||
|
|
||||||
echo '### Test --spreadstdin - this failed during devel'
|
echo '### Test --spreadstdin - this failed during devel';
|
||||||
seq 1 1000000 | md5sum
|
nice seq 1 1000000 | md5sum;
|
||||||
# Should give same result when sorted
|
nice seq 1 1000000 | nice nice parallel --recend "\n" -j10 --spreadstdin gzip -9 | zcat | sort -n | md5sum
|
||||||
seq 1 1000000 | parallel --recend "\n" -j10 --spreadstdin gzip -9 | zcat | sort -n | md5sum
|
|
||||||
|
|
||||||
echo '### Test --spreadstdin -k'
|
echo '### Test --spreadstdin -k';
|
||||||
seq 1 1000000 | parallel -k --recend "\n" -j10 --spreadstdin gzip -9 | zcat | md5sum
|
nice seq 1 1000000 | nice nice parallel -k --recend "\n" -j10 --spreadstdin gzip -9 | zcat | md5sum
|
||||||
|
|
||||||
echo '### Test --spreadstdin --files'
|
echo '### Test --spreadstdin --files';
|
||||||
nice seq 1 1000000 | shuf | parallel --files --recend "\n" -j10 --spreadstdin sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
nice seq 1 1000000 | shuf | parallel --files --recend "\n" -j10 --spreadstdin sort -n | parallel -Xj1 sort -nm {} ";"rm {} | md5sum
|
||||||
|
|
||||||
|
echo '### Test --number-of-cpus';
|
||||||
|
parallel --number-of-cpus
|
||||||
|
|
||||||
|
echo '### Test --number-of-cores';
|
||||||
|
parallel --number-of-cores
|
||||||
|
|
||||||
|
echo '### Test --use-cpus-instead-of-cores';
|
||||||
|
(seq 1 4 | stdout parallel --use-cpus-instead-of-cores -j100% sleep) && echo CPUs done &
|
||||||
|
(seq 1 4 | stdout parallel -j100% sleep) && echo cores done &
|
||||||
|
echo 'Cores should complete first on machines with less than 4 physical CPUs';
|
||||||
|
wait
|
||||||
|
|
||||||
|
echo '### Test --tag ::: a ::: b';
|
||||||
|
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a ::: b
|
||||||
|
|
||||||
|
echo '### Test --tag ::: a b';
|
||||||
|
stdout parallel -k --tag -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
||||||
|
|
||||||
|
echo '### Test --tag -X ::: a b';
|
||||||
|
stdout parallel -k --tag -X -j1 echo stderr-{.} ">&2;" echo stdout-{} ::: a b
|
||||||
|
|
||||||
|
echo '### Test bash redirection <()';
|
||||||
|
parallel 'cat <(echo {}); echo b' ::: a
|
||||||
|
|
||||||
|
echo '### Test bug https://savannah.gnu.org/bugs/index.php?33352'
|
||||||
|
|
||||||
|
# produce input slowly to parallel so that it will reap a process
|
||||||
|
# while blocking in read()
|
||||||
|
|
||||||
|
# Having found the solution it is suddenly very easy to reproduce the
|
||||||
|
# problem - even on other hardware:
|
||||||
|
#
|
||||||
|
# perl -e '@x=1 .. 17000; for(1..30) { print "@x\n"}' | pv -qL 200000
|
||||||
|
# |parallel -j2 --pipe --keeporder --block 150000 cat | md5sum
|
||||||
|
#
|
||||||
|
# This gives different md5sums for each run.
|
||||||
|
#
|
||||||
|
# The problem is that read(STDIN) is being interrupted by a dead
|
||||||
|
# child. The chance of this happening is very small if there are few
|
||||||
|
# children dying or read(STDIN) never has to wait for data.
|
||||||
|
#
|
||||||
|
# The test above forces data to arrive slowly (using pv) which causes
|
||||||
|
# read(STDIN) to take a long time - thus being interrupted by a dead
|
||||||
|
# child.
|
||||||
|
|
||||||
|
perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR cat | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR --recend '' cat | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR --recend '' --files cat | parallel -Xj1 cat {} ';' rm {} | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR --recend '' --files cat | parallel -Xj1 cat {} ';' rm {} | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR --recend '' --files --tmpdir /dev/shm cat | parallel -Xj1 cat {} ';' rm {} | md5sum
|
||||||
|
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 |
|
||||||
|
$PAR --recend '' --files --halt-on-error 2 cat | parallel -Xj1 cat {} ';' rm {} | md5sum
|
||||||
|
|
||||||
|
echo '### Test of -j filename';
|
||||||
|
nice stdout parallel -j no_such_file echo ::: 1
|
||||||
|
|
||||||
|
echo '### Test of -j filename';
|
||||||
|
echo 3 >/tmp/jobs_to_run1;
|
||||||
|
parallel -j /tmp/jobs_to_run1 -v sleep 0.{} ::: 9 8 7 6 4;
|
||||||
|
# Should give 7 8 9 4 6
|
||||||
|
|
||||||
|
echo '### Test ::::'
|
||||||
|
echo '### Change --arg-file-sep'
|
||||||
|
$XAP --arg-file-sep :::: -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
||||||
|
$XAP --arg-file-sep .--- -k echo {1} {2} .--- <(seq 1 10) <(seq 5 15)
|
||||||
|
$XAP --argfilesep :::: -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
||||||
|
$XAP --argfilesep .--- -k echo {1} {2} .--- <(seq 1 10) <(seq 5 15)
|
||||||
|
|
||||||
|
echo '### Test xapply --max-replace-args'
|
||||||
|
seq 0 7 | $XAP -k --max-replace-args=3 echo {3} {2} {1}
|
||||||
|
echo '### Test -N'
|
||||||
|
seq 1 5 | $XAP -kN3 echo {1} {2} {3}
|
||||||
|
echo '### Test -N with 0'
|
||||||
|
seq 0 7 | $XAP -kN3 echo {1} {2} {3}
|
||||||
|
echo '### Test :::: on nonexistent'
|
||||||
|
stdout $XAP -k echo {1} {2} {3} :::: nonexistent
|
||||||
|
echo '### Test :::: two files'
|
||||||
|
$XAP -k echo {1} {2} :::: <(seq 1 10) <(seq 5 15)
|
||||||
|
echo '### Test -d, ::::'
|
||||||
|
$XAP -kd, 'echo a{1} {2}b' :::: <(echo 1,2,3,) <(echo 5,6,7,8)
|
||||||
|
echo '### Test -d, :::: one file too much'
|
||||||
|
$XAP -kd, echo 'a{1}' '{2}b' :::: <(echo 1,2,3,) <(echo 5,6,7,8) <(echo 9,0)
|
||||||
|
echo '### Bug: did not quote'
|
||||||
|
$XAP echo {1} {2} :::: <(echo '>') <(echo b)
|
||||||
|
echo '### Quote test triplet 1'
|
||||||
|
$XAP -kv :::: <(echo 'echo a'; echo 'echo b')
|
||||||
|
$XAP -kv -a <(echo 'echo a'; echo 'echo b')
|
||||||
|
(echo 'echo a'; echo 'echo b') | $XAP -kv
|
||||||
|
echo '### Quote test triplet 2'
|
||||||
|
$XAP -kv echo :::: <(echo 'echo a'; echo 'echo b')
|
||||||
|
$XAP -kv -a <(echo 'echo a'; echo 'echo b') echo
|
||||||
|
(echo 'echo a'; echo 'echo b') | $XAP -kv echo
|
||||||
|
echo '### Quoting if there is a command and 2 arg files'
|
||||||
|
$XAP -kv echo :::: <(echo 'echo a') <(echo 'echo b')
|
||||||
|
echo '### Quoting if there is a command and 2 arg files of uneven length'
|
||||||
|
$XAP -kv echo :::: <(echo 'echo a';echo a1) <(echo 'echo b')
|
||||||
|
echo '### Quoting if there is no command and 2 arg files'
|
||||||
|
$XAP -kv :::: <(echo 'echo a') <(echo 'echo b')
|
||||||
|
echo '### Quoting if there is no command and 2 arg files of uneven length'
|
||||||
|
$XAP -kv :::: <(echo 'echo a';echo echo a1) <(echo 'echo b')
|
||||||
|
|
||||||
|
echo '### Test multiple -a'
|
||||||
|
$XAP -kv -a <(echo a) -a <(echo b) echo {2} {1}
|
||||||
|
$XAP -kv echo {2} {1} :::: <(echo a) <(echo b)
|
||||||
|
echo '### Multiple -a: An unused file'
|
||||||
|
$XAP -kv -a <(echo a) -a <(echo b) -a <(echo c) echo {2} {1}
|
||||||
|
$XAP -kv echo {2} {1} :::: <(echo a) <(echo b) <(echo c)
|
||||||
|
echo '### Multiple -a: nonexistent'
|
||||||
|
stdout $XAP -kv echo {2} {1} :::: nonexist nonexist2
|
||||||
|
stdout $XAP -kv -a nonexist -a nonexist2 echo {2} {1}
|
||||||
|
|
||||||
|
echo '### Test {#.}'
|
||||||
|
$XAP -kv -a <(echo a-noext) -a <(echo b-withext.extension) -a <(echo c-ext.gif) echo {3.} {2.} {1.}
|
||||||
|
|
||||||
|
echo "### Tests that failed for OO-rewrite"
|
||||||
|
parallel -u --semaphore seq 1 10 '|' pv -qL 20; sem --wait; echo done
|
||||||
|
echo a | parallel echo {1}
|
||||||
|
echo "echo a" | parallel
|
||||||
|
parallel -j1 -I :: -X echo 'a::b::^c::[.}c' ::: 1
|
||||||
|
|
||||||
|
echo "### BUG: The length for -X is not close to max (131072)"
|
||||||
|
seq 1 4000 | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
||||||
|
|
||||||
|
echo "### BUG: empty lines with --show-limit"
|
||||||
|
echo | parallel --show-limits
|
||||||
|
|
||||||
|
echo '### Test -N'
|
||||||
|
seq 1 5 | parallel -kN3 echo {1} {2} {3}
|
||||||
|
|
||||||
|
echo '### Test --arg-file-sep with files of different lengths'
|
||||||
|
parallel --xapply --arg-file-sep :::: -k echo {1} {2} :::: <(seq 1 1) <(seq 3 4)
|
||||||
|
|
||||||
|
echo '### Test respect -s'
|
||||||
|
parallel -kvm -IARG -s15 echo ARG ::: 1 22 333 4444 55555 666666 7777777 88888888 999999999
|
||||||
|
|
||||||
|
echo '### Test eof string after :::'
|
||||||
|
parallel -k -E ole echo ::: foo ole bar
|
||||||
|
|
||||||
|
echo '### Test -C and --trim rl'
|
||||||
|
parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"' ::: 'a% c %%b' 'a%c% b %d'
|
||||||
|
|
||||||
|
echo '### Test empty input'
|
||||||
|
</dev/null parallel -j +0 echo
|
||||||
|
|
||||||
|
echo '### Test -m'
|
||||||
|
seq 1 2 | parallel -k -m echo
|
||||||
|
|
||||||
|
echo '### Test :::'
|
||||||
|
parallel echo ::: 1
|
||||||
|
|
||||||
|
echo '### Test context_replace'
|
||||||
|
echo a | parallel -qX echo "'"{}"' "
|
||||||
|
|
||||||
|
echo '### Test -N2 {2}'
|
||||||
|
seq 1 4 | parallel -kN2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
|
||||||
|
|
||||||
|
echo '### Test -E (should only output foo ole)'
|
||||||
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 -E bar echo
|
||||||
|
parallel -kr -L2 -E bar echo ::: foo '' 'ole ' bar quux
|
||||||
|
|
||||||
|
echo '### Test -r (should only output foo ole bar\nquux)'
|
||||||
|
parallel -kr -L2 echo ::: foo '' 'ole ' bar quux
|
||||||
|
|
||||||
|
echo '### Test of tab as colsep'
|
||||||
|
printf 'def\tabc\njkl\tghi' | parallel -k --colsep '\t' echo {2} {1}
|
||||||
|
parallel -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo '### Test of -j filename with file content changing';
|
||||||
|
echo 1 >/tmp/jobs_to_run2;
|
||||||
|
(sleep 3; echo 10 >/tmp/jobs_to_run2) &
|
||||||
|
parallel -j /tmp/jobs_to_run2 -v sleep {} ::: 3.3 1.1 1.3 1.4 1.2 1 1 1 1 1 1 1 1 1 1 1
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
### Test --number-of-cpus
|
|
||||||
1
|
|
||||||
### Test --number-of-cores
|
|
||||||
2
|
|
||||||
### Test --use-cpus-instead-of-cores
|
|
||||||
Cores should complete first on machines with less than 4 physical CPUs
|
|
||||||
cores done
|
|
||||||
CPUs done
|
|
||||||
### Test --tag ::: a ::: b
|
|
||||||
a b stderr-a b
|
|
||||||
a b stdout-a b
|
|
||||||
### Test --tag ::: a b
|
|
||||||
a stderr-a
|
|
||||||
a stdout-a
|
|
||||||
b stderr-b
|
|
||||||
b stdout-b
|
|
||||||
### Test --tag -X ::: a b
|
|
||||||
a b stderr-a stderr-b
|
|
||||||
a b stdout-a stdout-b
|
|
||||||
### Test bash redirection <()
|
|
||||||
a
|
|
||||||
b
|
|
|
@ -1,71 +0,0 @@
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
done
|
|
||||||
a
|
|
||||||
a
|
|
||||||
a1b1^c1[.}c
|
|
||||||
### BUG: The length for -X is not close to max (131072)
|
|
||||||
1 12821 131060
|
|
||||||
### BUG: empty lines with --show-limit
|
|
||||||
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
|
|
||||||
### Test -N
|
|
||||||
1 2 3
|
|
||||||
4 5
|
|
||||||
### Test --arg-file-sep with files of different lengths
|
|
||||||
1 3
|
|
||||||
4
|
|
||||||
### Test respect -s
|
|
||||||
echo 1 22 333
|
|
||||||
1 22 333
|
|
||||||
echo 4444
|
|
||||||
4444
|
|
||||||
echo 55555
|
|
||||||
55555
|
|
||||||
echo 666666
|
|
||||||
666666
|
|
||||||
echo 7777777
|
|
||||||
7777777
|
|
||||||
echo 88888888
|
|
||||||
88888888
|
|
||||||
echo 999999999
|
|
||||||
999999999
|
|
||||||
### Test eof string after :::
|
|
||||||
foo
|
|
||||||
### Test -C and --trim rl
|
|
||||||
a_b_c_{4}
|
|
||||||
a_b_c_d
|
|
||||||
### Test empty input
|
|
||||||
### Test -m
|
|
||||||
1
|
|
||||||
2
|
|
||||||
### Test :::
|
|
||||||
1
|
|
||||||
### Test context_replace
|
|
||||||
'a'
|
|
||||||
### Test -N2 {2}
|
|
||||||
arg1:1 seq:1 arg2:2
|
|
||||||
arg1:3 seq:2 arg2:4
|
|
||||||
### Test -E (should only output foo ole)
|
|
||||||
foo ole
|
|
||||||
foo ole
|
|
||||||
### Test -r (should only output foo ole bar\nquux)
|
|
||||||
foo ole bar
|
|
||||||
quux
|
|
||||||
### Test of tab as colsep
|
|
||||||
abc def
|
|
||||||
ghi jkl
|
|
||||||
abc def
|
|
||||||
ghi jkl
|
|
|
@ -1,145 +0,0 @@
|
||||||
### Test ::::
|
|
||||||
### Change --arg-file-sep
|
|
||||||
1 5
|
|
||||||
2 6
|
|
||||||
3 7
|
|
||||||
4 8
|
|
||||||
5 9
|
|
||||||
6 10
|
|
||||||
7 11
|
|
||||||
8 12
|
|
||||||
9 13
|
|
||||||
10 14
|
|
||||||
15
|
|
||||||
1 5
|
|
||||||
2 6
|
|
||||||
3 7
|
|
||||||
4 8
|
|
||||||
5 9
|
|
||||||
6 10
|
|
||||||
7 11
|
|
||||||
8 12
|
|
||||||
9 13
|
|
||||||
10 14
|
|
||||||
15
|
|
||||||
1 5
|
|
||||||
2 6
|
|
||||||
3 7
|
|
||||||
4 8
|
|
||||||
5 9
|
|
||||||
6 10
|
|
||||||
7 11
|
|
||||||
8 12
|
|
||||||
9 13
|
|
||||||
10 14
|
|
||||||
15
|
|
||||||
1 5
|
|
||||||
2 6
|
|
||||||
3 7
|
|
||||||
4 8
|
|
||||||
5 9
|
|
||||||
6 10
|
|
||||||
7 11
|
|
||||||
8 12
|
|
||||||
9 13
|
|
||||||
10 14
|
|
||||||
15
|
|
||||||
### Test xapply --max-replace-args
|
|
||||||
2 1 0
|
|
||||||
5 4 3
|
|
||||||
7 6
|
|
||||||
### Test -N
|
|
||||||
1 2 3
|
|
||||||
4 5
|
|
||||||
### Test -N with 0
|
|
||||||
0 1 2
|
|
||||||
3 4 5
|
|
||||||
6 7
|
|
||||||
### Test :::: on nonexistent
|
|
||||||
parallel: Cannot open input file `nonexistent': No such file or directory
|
|
||||||
### Test :::: two files
|
|
||||||
1 5
|
|
||||||
2 6
|
|
||||||
3 7
|
|
||||||
4 8
|
|
||||||
5 9
|
|
||||||
6 10
|
|
||||||
7 11
|
|
||||||
8 12
|
|
||||||
9 13
|
|
||||||
10 14
|
|
||||||
15
|
|
||||||
### Test -d, ::::
|
|
||||||
a1 5b
|
|
||||||
a2 6b
|
|
||||||
a3 7b
|
|
||||||
a
|
|
||||||
8
|
|
||||||
b
|
|
||||||
### Test -d, :::: one file too much
|
|
||||||
a1 5b
|
|
||||||
a2 6b
|
|
||||||
a3 7b
|
|
||||||
a
|
|
||||||
8
|
|
||||||
b
|
|
||||||
### Bug: did not quote
|
|
||||||
> b
|
|
||||||
### Quote test triplet 1
|
|
||||||
echo a
|
|
||||||
a
|
|
||||||
echo b
|
|
||||||
b
|
|
||||||
echo a
|
|
||||||
a
|
|
||||||
echo b
|
|
||||||
b
|
|
||||||
echo a
|
|
||||||
a
|
|
||||||
echo b
|
|
||||||
b
|
|
||||||
### Quote test triplet 2
|
|
||||||
echo echo\ a
|
|
||||||
echo a
|
|
||||||
echo echo\ b
|
|
||||||
echo b
|
|
||||||
echo echo\ a
|
|
||||||
echo a
|
|
||||||
echo echo\ b
|
|
||||||
echo b
|
|
||||||
echo echo\ a
|
|
||||||
echo a
|
|
||||||
echo echo\ b
|
|
||||||
echo b
|
|
||||||
### Quoting if there is a command and 2 arg files
|
|
||||||
echo echo\ a echo\ b
|
|
||||||
echo a echo b
|
|
||||||
### Quoting if there is a command and 2 arg files of uneven length
|
|
||||||
echo echo\ a echo\ b
|
|
||||||
echo a echo b
|
|
||||||
echo a1
|
|
||||||
a1
|
|
||||||
### Quoting if there is no command and 2 arg files
|
|
||||||
echo a echo b
|
|
||||||
a echo b
|
|
||||||
### Quoting if there is no command and 2 arg files of uneven length
|
|
||||||
echo a echo b
|
|
||||||
a echo b
|
|
||||||
echo a1
|
|
||||||
a1
|
|
||||||
### Test multiple -a
|
|
||||||
echo b a
|
|
||||||
b a
|
|
||||||
echo b a
|
|
||||||
b a
|
|
||||||
### Multiple -a: An unused file
|
|
||||||
echo b a
|
|
||||||
b a
|
|
||||||
echo b a
|
|
||||||
b a
|
|
||||||
### Multiple -a: nonexistent
|
|
||||||
parallel: Cannot open input file `nonexist': No such file or directory
|
|
||||||
parallel: Cannot open input file `nonexist': No such file or directory
|
|
||||||
### Test {#.}
|
|
||||||
echo c-ext b-withext a-noext
|
|
||||||
c-ext b-withext a-noext
|
|
|
@ -1,8 +0,0 @@
|
||||||
### Test bug https://savannah.gnu.org/bugs/index.php?33352
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
||||||
350eda13a37912d755c9d733d149bdaf -
|
|
|
@ -1,53 +0,0 @@
|
||||||
### Test of -j filename
|
|
||||||
Usage:
|
|
||||||
parallel [options] [command [arguments]] < list_of_arguments
|
|
||||||
parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
|
|
||||||
cat ... | parallel --pipe [options] [command [arguments]]
|
|
||||||
|
|
||||||
-j n Run n jobs in parallel
|
|
||||||
-k Keep same order
|
|
||||||
-X Multiple arguments with context replace
|
|
||||||
--colsep regexp Split input on regexp for positional replacements
|
|
||||||
{} {.} {/} {/.} {#} Replacement strings
|
|
||||||
{3} {3.} {3/} {3/.} Positional replacement strings
|
|
||||||
|
|
||||||
-S sshlogin Example: foo@server.example.com
|
|
||||||
--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins
|
|
||||||
--trc {}.bar Shorthand for --transfer --return {}.bar --cleanup
|
|
||||||
--onall Run the given command with argument on all sshlogins
|
|
||||||
--nonall Run the given command with no arguments on all sshlogins
|
|
||||||
|
|
||||||
--pipe Split stdin (standard input) to multiple jobs.
|
|
||||||
--recend str Record end separator for --pipe.
|
|
||||||
--recstart str Record start separator for --pipe.
|
|
||||||
|
|
||||||
See 'man parallel' for details
|
|
||||||
|
|
||||||
When using GNU Parallel for a publication please cite:
|
|
||||||
|
|
||||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
|
||||||
;login: The USENIX Magazine, February 2011:42-47.
|
|
||||||
Parsing of --jobs/-j/--max-procs/-P failed
|
|
||||||
### Test of -j filename
|
|
||||||
sleep 0.7
|
|
||||||
sleep 0.8
|
|
||||||
sleep 0.9
|
|
||||||
sleep 0.4
|
|
||||||
sleep 0.6
|
|
||||||
### Test of -j filename with file content changing
|
|
||||||
sleep 3.3
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1.1
|
|
||||||
sleep 1.2
|
|
||||||
sleep 1.3
|
|
||||||
sleep 1.4
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
||||||
sleep 1
|
|
|
@ -27,3 +27,303 @@
|
||||||
8a7095c1c23bfadc311fe6b16d950582 -
|
8a7095c1c23bfadc311fe6b16d950582 -
|
||||||
### Test --spreadstdin --files
|
### Test --spreadstdin --files
|
||||||
8a7095c1c23bfadc311fe6b16d950582 -
|
8a7095c1c23bfadc311fe6b16d950582 -
|
||||||
|
### Test --number-of-cpus
|
||||||
|
1
|
||||||
|
### Test --number-of-cores
|
||||||
|
2
|
||||||
|
### Test --use-cpus-instead-of-cores
|
||||||
|
Cores should complete first on machines with less than 4 physical CPUs
|
||||||
|
cores done
|
||||||
|
CPUs done
|
||||||
|
### Test --tag ::: a ::: b
|
||||||
|
a b stderr-a b
|
||||||
|
a b stdout-a b
|
||||||
|
### Test --tag ::: a b
|
||||||
|
a stderr-a
|
||||||
|
a stdout-a
|
||||||
|
b stderr-b
|
||||||
|
b stdout-b
|
||||||
|
### Test --tag -X ::: a b
|
||||||
|
a b stderr-a stderr-b
|
||||||
|
a b stdout-a stdout-b
|
||||||
|
### Test bash redirection <()
|
||||||
|
a
|
||||||
|
b
|
||||||
|
### Test bug https://savannah.gnu.org/bugs/index.php?33352
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
350eda13a37912d755c9d733d149bdaf -
|
||||||
|
### Test of -j filename
|
||||||
|
Usage:
|
||||||
|
parallel [options] [command [arguments]] < list_of_arguments
|
||||||
|
parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
|
||||||
|
cat ... | parallel --pipe [options] [command [arguments]]
|
||||||
|
|
||||||
|
-j n Run n jobs in parallel
|
||||||
|
-k Keep same order
|
||||||
|
-X Multiple arguments with context replace
|
||||||
|
--colsep regexp Split input on regexp for positional replacements
|
||||||
|
{} {.} {/} {/.} {#} Replacement strings
|
||||||
|
{3} {3.} {3/} {3/.} Positional replacement strings
|
||||||
|
|
||||||
|
-S sshlogin Example: foo@server.example.com
|
||||||
|
--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins
|
||||||
|
--trc {}.bar Shorthand for --transfer --return {}.bar --cleanup
|
||||||
|
--onall Run the given command with argument on all sshlogins
|
||||||
|
--nonall Run the given command with no arguments on all sshlogins
|
||||||
|
|
||||||
|
--pipe Split stdin (standard input) to multiple jobs.
|
||||||
|
--recend str Record end separator for --pipe.
|
||||||
|
--recstart str Record start separator for --pipe.
|
||||||
|
|
||||||
|
See 'man parallel' for details
|
||||||
|
|
||||||
|
When using GNU Parallel for a publication please cite:
|
||||||
|
|
||||||
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
Parsing of --jobs/-j/--max-procs/-P failed
|
||||||
|
### Test of -j filename
|
||||||
|
sleep 0.7
|
||||||
|
sleep 0.8
|
||||||
|
sleep 0.9
|
||||||
|
sleep 0.4
|
||||||
|
sleep 0.6
|
||||||
|
### Test ::::
|
||||||
|
### Change --arg-file-sep
|
||||||
|
1 5
|
||||||
|
2 6
|
||||||
|
3 7
|
||||||
|
4 8
|
||||||
|
5 9
|
||||||
|
6 10
|
||||||
|
7 11
|
||||||
|
8 12
|
||||||
|
9 13
|
||||||
|
10 14
|
||||||
|
15
|
||||||
|
1 5
|
||||||
|
2 6
|
||||||
|
3 7
|
||||||
|
4 8
|
||||||
|
5 9
|
||||||
|
6 10
|
||||||
|
7 11
|
||||||
|
8 12
|
||||||
|
9 13
|
||||||
|
10 14
|
||||||
|
15
|
||||||
|
1 5
|
||||||
|
2 6
|
||||||
|
3 7
|
||||||
|
4 8
|
||||||
|
5 9
|
||||||
|
6 10
|
||||||
|
7 11
|
||||||
|
8 12
|
||||||
|
9 13
|
||||||
|
10 14
|
||||||
|
15
|
||||||
|
1 5
|
||||||
|
2 6
|
||||||
|
3 7
|
||||||
|
4 8
|
||||||
|
5 9
|
||||||
|
6 10
|
||||||
|
7 11
|
||||||
|
8 12
|
||||||
|
9 13
|
||||||
|
10 14
|
||||||
|
15
|
||||||
|
### Test xapply --max-replace-args
|
||||||
|
2 1 0
|
||||||
|
5 4 3
|
||||||
|
7 6
|
||||||
|
### Test -N
|
||||||
|
1 2 3
|
||||||
|
4 5
|
||||||
|
### Test -N with 0
|
||||||
|
0 1 2
|
||||||
|
3 4 5
|
||||||
|
6 7
|
||||||
|
### Test :::: on nonexistent
|
||||||
|
parallel: Cannot open input file `nonexistent': No such file or directory
|
||||||
|
### Test :::: two files
|
||||||
|
1 5
|
||||||
|
2 6
|
||||||
|
3 7
|
||||||
|
4 8
|
||||||
|
5 9
|
||||||
|
6 10
|
||||||
|
7 11
|
||||||
|
8 12
|
||||||
|
9 13
|
||||||
|
10 14
|
||||||
|
15
|
||||||
|
### Test -d, ::::
|
||||||
|
a1 5b
|
||||||
|
a2 6b
|
||||||
|
a3 7b
|
||||||
|
a
|
||||||
|
8
|
||||||
|
b
|
||||||
|
### Test -d, :::: one file too much
|
||||||
|
a1 5b
|
||||||
|
a2 6b
|
||||||
|
a3 7b
|
||||||
|
a
|
||||||
|
8
|
||||||
|
b
|
||||||
|
### Bug: did not quote
|
||||||
|
> b
|
||||||
|
### Quote test triplet 1
|
||||||
|
echo a
|
||||||
|
a
|
||||||
|
echo b
|
||||||
|
b
|
||||||
|
echo a
|
||||||
|
a
|
||||||
|
echo b
|
||||||
|
b
|
||||||
|
echo a
|
||||||
|
a
|
||||||
|
echo b
|
||||||
|
b
|
||||||
|
### Quote test triplet 2
|
||||||
|
echo echo\ a
|
||||||
|
echo a
|
||||||
|
echo echo\ b
|
||||||
|
echo b
|
||||||
|
echo echo\ a
|
||||||
|
echo a
|
||||||
|
echo echo\ b
|
||||||
|
echo b
|
||||||
|
echo echo\ a
|
||||||
|
echo a
|
||||||
|
echo echo\ b
|
||||||
|
echo b
|
||||||
|
### Quoting if there is a command and 2 arg files
|
||||||
|
echo echo\ a echo\ b
|
||||||
|
echo a echo b
|
||||||
|
### Quoting if there is a command and 2 arg files of uneven length
|
||||||
|
echo echo\ a echo\ b
|
||||||
|
echo a echo b
|
||||||
|
echo a1
|
||||||
|
a1
|
||||||
|
### Quoting if there is no command and 2 arg files
|
||||||
|
echo a echo b
|
||||||
|
a echo b
|
||||||
|
### Quoting if there is no command and 2 arg files of uneven length
|
||||||
|
echo a echo b
|
||||||
|
a echo b
|
||||||
|
echo a1
|
||||||
|
a1
|
||||||
|
### Test multiple -a
|
||||||
|
echo b a
|
||||||
|
b a
|
||||||
|
echo b a
|
||||||
|
b a
|
||||||
|
### Multiple -a: An unused file
|
||||||
|
echo b a
|
||||||
|
b a
|
||||||
|
echo b a
|
||||||
|
b a
|
||||||
|
### Multiple -a: nonexistent
|
||||||
|
parallel: Cannot open input file `nonexist': No such file or directory
|
||||||
|
parallel: Cannot open input file `nonexist': No such file or directory
|
||||||
|
### Test {#.}
|
||||||
|
echo c-ext b-withext a-noext
|
||||||
|
c-ext b-withext a-noext
|
||||||
|
### Tests that failed for OO-rewrite
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
done
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a1b1^c1[.}c
|
||||||
|
### BUG: The length for -X is not close to max (131072)
|
||||||
|
1 12821 131060
|
||||||
|
### BUG: empty lines with --show-limit
|
||||||
|
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
|
||||||
|
### Test -N
|
||||||
|
1 2 3
|
||||||
|
4 5
|
||||||
|
### Test --arg-file-sep with files of different lengths
|
||||||
|
1 3
|
||||||
|
4
|
||||||
|
### Test respect -s
|
||||||
|
echo 1 22 333
|
||||||
|
1 22 333
|
||||||
|
echo 4444
|
||||||
|
4444
|
||||||
|
echo 55555
|
||||||
|
55555
|
||||||
|
echo 666666
|
||||||
|
666666
|
||||||
|
echo 7777777
|
||||||
|
7777777
|
||||||
|
echo 88888888
|
||||||
|
88888888
|
||||||
|
echo 999999999
|
||||||
|
999999999
|
||||||
|
### Test eof string after :::
|
||||||
|
foo
|
||||||
|
### Test -C and --trim rl
|
||||||
|
a_b_c_{4}
|
||||||
|
a_b_c_d
|
||||||
|
### Test empty input
|
||||||
|
### Test -m
|
||||||
|
1
|
||||||
|
2
|
||||||
|
### Test :::
|
||||||
|
1
|
||||||
|
### Test context_replace
|
||||||
|
'a'
|
||||||
|
### Test -N2 {2}
|
||||||
|
arg1:1 seq:1 arg2:2
|
||||||
|
arg1:3 seq:2 arg2:4
|
||||||
|
### Test -E (should only output foo ole)
|
||||||
|
foo ole
|
||||||
|
foo ole
|
||||||
|
### Test -r (should only output foo ole bar\nquux)
|
||||||
|
foo ole bar
|
||||||
|
quux
|
||||||
|
### Test of tab as colsep
|
||||||
|
abc def
|
||||||
|
ghi jkl
|
||||||
|
abc def
|
||||||
|
ghi jkl
|
||||||
|
### Test of -j filename with file content changing
|
||||||
|
sleep 3.3
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1.1
|
||||||
|
sleep 1.2
|
||||||
|
sleep 1.3
|
||||||
|
sleep 1.4
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
sleep 1
|
||||||
|
|
Loading…
Reference in a new issue