mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 07:27:55 +00:00
0install wants compiled man pages to be distributed. *.1 are now distributed.
More tests from test suite passes - though not all.
This commit is contained in:
parent
1cc9c990a4
commit
3ee7f79325
|
@ -143,6 +143,9 @@ download at: http://ftp.gnu.org/gnu/parallel/
|
|||
|
||||
New in this release:
|
||||
|
||||
* First review in Polish. Thanks to Patryk Krawaczyński.
|
||||
http://nfsec.pl/root/2458
|
||||
|
||||
* Review in Spanish (in print).
|
||||
https://www.linux-magazine.es/issue/67/moreinfo.html
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ niceload.html: niceload Makefile sem
|
|||
sem: parallel
|
||||
ln -fs parallel sem
|
||||
|
||||
DISTCLEANFILES = parallel.1 sem.1 sql.1 niceload.1 parallel.html sem.html sql.html niceload.html
|
||||
DISTCLEANFILES = parallel.html sem.html sql.html niceload.html
|
||||
EXTRA_DIST = parallel sem sql niceload \
|
||||
parallel.1 sem.1 sql.1 niceload.1 \
|
||||
parallel.html sem.html sql.html niceload.html \
|
||||
|
|
|
@ -149,7 +149,7 @@ top_srcdir = @top_srcdir@
|
|||
bin_SCRIPTS = parallel sem sql niceload
|
||||
man_MANS = parallel.1 sem.1 sql.1 niceload.1
|
||||
doc_DATA = parallel.html sem.html sql.html niceload.html
|
||||
DISTCLEANFILES = parallel.1 sem.1 sql.1 niceload.1 parallel.html sem.html sql.html niceload.html
|
||||
DISTCLEANFILES = parallel.html sem.html sql.html niceload.html
|
||||
EXTRA_DIST = parallel sem sql niceload \
|
||||
parallel.1 sem.1 sql.1 niceload.1 \
|
||||
parallel.html sem.html sql.html niceload.html \
|
||||
|
|
|
@ -1122,6 +1122,8 @@ Even small shell scripts can be run by GNU B<parallel>:
|
|||
|
||||
B<find . | parallel 'a={}; name=${a##*/}; upper=$(echo "$name" | tr "[:lower:]" "[:upper:]"); echo "$name - $upper"'>
|
||||
|
||||
B<ls | parallel 'mv {} "$(echo {} | tr "[:upper:]" "[:lower:]")"'>
|
||||
|
||||
Given a list of URLs, list all URLs that fail to download. Print the
|
||||
line number and the URL.
|
||||
|
||||
|
@ -2003,7 +2005,7 @@ B<xargs> deals badly with special characters (such as space, ' and
|
|||
touch important_file
|
||||
touch 'not important_file'
|
||||
ls not* | xargs rm
|
||||
mkdir -p '12" records'
|
||||
mkdir -p "My brother's 12\" records"
|
||||
ls | xargs rmdir
|
||||
|
||||
You can specify B<-0> or B<-d "\n">, but many input generators are not
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
# Test xargs compatibility
|
||||
|
||||
|
||||
|
||||
echo '### Test -p --interactive'
|
||||
cat >/tmp/parallel-script-for-expect <<_EOF
|
||||
#!/bin/bash
|
||||
|
@ -27,13 +25,12 @@ expect "echo opt--interactive 1"
|
|||
send "y\n"
|
||||
expect "echo opt--interactive 2"
|
||||
send "n\n"
|
||||
expect "opt--interactive 1"
|
||||
expect "echo opt--interactive 3"
|
||||
send "y\n"
|
||||
expect "opt--interactive 1"
|
||||
expect "opt--interactive 3"
|
||||
_EOF
|
||||
|
||||
|
||||
echo '### Test -L -l and --max-lines'
|
||||
(echo a_b;echo c) | parallel -km -L2 echo
|
||||
(echo a_b;echo c) | parallel -k -L2 echo
|
||||
|
@ -183,4 +180,4 @@ echo '### Test --verbose and -t'
|
|||
|
||||
echo '### Test --show-limits'
|
||||
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
||||
(echo b; echo c; echo f) | parallel -kX --show-limits -s 100 echo {}ar
|
||||
(echo b; echo c; echo f) | parallel -j1 -kX --show-limits -s 100 echo {}ar
|
||||
|
|
|
@ -30,31 +30,31 @@ ls | parallel -kv rm -- {.}/abc-{.}-{} 2>&1
|
|||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rm -- {}/abc-{}-{} 2>&1 \
|
||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rmdir -- {} 2>&1 \
|
||||
echo '### Test -m'
|
||||
(echo foo;echo bar;echo joe.gif) | parallel -km echo 1{}2{.}3 A{.}B{.}C
|
||||
(echo foo;echo bar;echo joe.gif) | parallel -kX echo 1{}2{.}3 A{.}B{.}C
|
||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -km echo a{}b{.}c{.}
|
||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -kX echo a{}b{.}c{.}
|
||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
|
||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
|
||||
echo '### Test -m with 60000 args'
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -km echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -km echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
|
||||
echo '### Test -X with 60000 args'
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b{.}c{.} | mop -d 4 "|md5sum" "| wc"
|
||||
echo '### Test -X with 60000 args and 5 expansions'
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b{.}c{.}{.}{} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b{.}c{.}{.} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b{.}c{.} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b{.}c | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -kX echo a{}b | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b{.}c | wc -l
|
||||
seq 1 60000 | perl -pe 's/$/.gif\n/' | parallel -j1 -kX echo a{}b | wc -l
|
||||
echo '### Test {.} does not repeat more than {}'
|
||||
seq 1 15 | perl -pe 's/$/.gif\n/' | parallel -s 80 -kX echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif\n/' | parallel -s 80 -km echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -s 80 -kX echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -s 80 -km echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif\n/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif\n/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||
|
||||
echo '### Test -I with shell meta chars'
|
||||
seq 1 60000 | parallel -I :: -X echo a::b::c:: | wc -l
|
||||
seq 1 60000 | parallel -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
||||
seq 1 60000 | parallel -I '<' -X echo 'a<b<c<' | wc -l
|
||||
seq 1 60000 | parallel -I '>' -X echo 'a>b>c>' | wc -l
|
||||
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
|
||||
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
||||
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
|
||||
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
||||
|
||||
echo '### Test {.}'
|
||||
echo a | parallel -qX echo "'"{.}"' "
|
||||
|
@ -63,8 +63,8 @@ echo a | parallel -qX echo "'{.}'"
|
|||
| parallel -k -j0
|
||||
echo '### Test -I with -X and -m'
|
||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -X -k -I :: echo a{.} b::'
|
||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -m -k -I :: echo a{.} b::'
|
||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
|
||||
echo '### Test -i'
|
||||
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
|
||||
echo '### Test --replace'
|
||||
|
|
|
@ -37,8 +37,8 @@ parallel -kj 1 ::: "sleep 1; echo 1" "echo 2" "echo 3"
|
|||
echo '### Bug did not quote'
|
||||
echo '>' | parallel -v echo
|
||||
parallel -v echo ::: '>'
|
||||
(echo '>'; echo 2) | parallel -vX echo
|
||||
parallel -X echo ::: '>' 2
|
||||
(echo '>'; echo 2) | parallel -j1 -vX echo
|
||||
parallel -X -j1 echo ::: '>' 2
|
||||
echo '### Must not quote'
|
||||
echo 'echo | wc -l' | parallel -v
|
||||
parallel -v ::: 'echo | wc -l'
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "### Test --basenamereplace"
|
||||
parallel -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -k --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
|
||||
echo "### Test --basenameextensionreplace"
|
||||
parallel -k -X --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -j1 -k -X --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -k --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
|
||||
echo "### Test {/}"
|
||||
parallel -k -X echo {/} ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -j1 -k -X echo {/} ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
|
||||
echo "### Test {/.}"
|
||||
parallel -k -X echo {/.} ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
parallel -j1 -k -X echo {/.} ::: /a/b.c a/b.c b.c /a/b a/b b
|
||||
|
||||
echo "### Test {#/.}"
|
||||
parallel -k -X echo {2/.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
parallel -j1 -k -X echo {2/.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
|
||||
echo "### Test {#/}"
|
||||
parallel -k -X echo {2/} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
parallel -j1 -k -X echo {2/} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
|
||||
echo "### Test {#.}"
|
||||
parallel -k -X echo {2.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
parallel -j1 -k -X echo {2.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
||||
|
||||
SERVER1=parallel-server3
|
||||
SERVER2=parallel-server2
|
||||
rm -rf tmp
|
||||
|
||||
echo "### Test combined -X --return {/}_{/.}_{#/.}_{#/}_{#.} with files containing space"
|
||||
stdout parallel -k -Xv --cleanup --return tmp/{/}_{/.}_{2/.}_{2/}_{2.}/file -S parallel@$SERVER2 \
|
||||
stdout parallel -j1 -k -Xv --cleanup --return tmp/{/}_{/.}_{2/.}_{2/}_{2.}/file -S parallel@$SERVER2 \
|
||||
mkdir -p tmp/{/}_{/.}_{2/.}_{2/}_{2.} \;touch tmp/{/}_{/.}_{2/.}_{2/}_{2.}/file \
|
||||
::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6 'number 7' 'number <8|8>'
|
||||
find tmp
|
||||
|
|
|
@ -2,16 +2,17 @@
|
|||
spawn /tmp/parallel-script-for-expect
|
||||
echo opt-p 1 ?...y
|
||||
echo opt-p 2 ?...n
|
||||
echo opt-p 3 ?...y
|
||||
opt-p 1
|
||||
echo opt-p 3 ?...y
|
||||
opt-p 3
|
||||
echo opt--interactive 1 ?...y
|
||||
echo opt--interactive 2 ?...n
|
||||
echo opt--interactive 3 ?...y
|
||||
opt--interactive 1
|
||||
echo opt--interactive 3 ?...y
|
||||
opt--interactive 3
|
||||
### Test -L -l and --max-lines
|
||||
a_b c
|
||||
a_b
|
||||
c
|
||||
a_b c
|
||||
a_b c
|
||||
a_b
|
||||
|
@ -79,7 +80,7 @@ xargs: argument line too long
|
|||
5 6
|
||||
7 8
|
||||
9 10
|
||||
Command line too long (1000007 >= 10) at number 6: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
Command line too long (1000007 >= 10) at number 5: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
1 2
|
||||
3 4
|
||||
5 6
|
||||
|
@ -91,20 +92,20 @@ xargs: argument line too long
|
|||
5 6
|
||||
7 8
|
||||
9 10
|
||||
Command line too long (1000007 >= 10) at number 6: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
Command line too long (1000007 >= 10) at number 5: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||
### Test -x
|
||||
1 2
|
||||
3 4
|
||||
5 6
|
||||
7 8
|
||||
9 10
|
||||
Command line too long (10 >= 10) at number 6: 12345...
|
||||
Command line too long (10 >= 10) at number 5: 12345...
|
||||
1 2
|
||||
3 4
|
||||
5 6
|
||||
7 8
|
||||
9 10
|
||||
Command line too long (10 >= 10) at number 6: 12345...
|
||||
Command line too long (10 >= 10) at number 5: 12345...
|
||||
1 2
|
||||
3 4
|
||||
5 6
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
### Test of --eta with no jobs
|
||||
|
||||
Computers / CPU cores / Max jobs to run
|
||||
1:local / 2 / 9
|
||||
1:local / 2 / 0
|
||||
|
||||
### Test of --progress
|
||||
16
|
||||
### Test of --progress with no jobs
|
||||
|
||||
Computers / CPU cores / Max jobs to run
|
||||
1:local / 2 / 9
|
||||
1:local / 2 / 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue