2014-12-26 17:31:06 +00:00
|
|
|
|
echo "bug #43654: --bar with command not using {} - only last output line "
|
|
|
|
|
bug #43654: --bar with command not using {} - only last output line
|
|
|
|
|
COLUMNS=80 stdout parallel --bar true {.} ::: 1 | perl -pe 's/.*\r/\r/'
|
|
|
|
|
[7m100% 1:0=0s 1 [0m[0m
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --basenamereplace"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --basenamereplace
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b.c b.c b.c b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b.c
|
|
|
|
|
b.c
|
|
|
|
|
b.c
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --bnr"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --bnr
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --bnr FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b.c b.c b.c b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --bnr FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b.c
|
|
|
|
|
b.c
|
|
|
|
|
b.c
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --extensionreplace"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --extensionreplace
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --extensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
/a/b a/b b /a/b a/b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --extensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
/a/b
|
|
|
|
|
a/b
|
|
|
|
|
b
|
|
|
|
|
/a/b
|
|
|
|
|
a/b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --er"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --er
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --er FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
/a/b a/b b /a/b a/b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --er FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
/a/b
|
|
|
|
|
a/b
|
|
|
|
|
b
|
|
|
|
|
/a/b
|
|
|
|
|
a/b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --basenameextensionreplace"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --basenameextensionreplace
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b b b b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --basenameextensionreplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --bner"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test --bner
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X --bner FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b b b b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --bner FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
|
|
|
|
b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test {/}"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test {/}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X echo {/} ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b.c b.c b.c b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test {/.}"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test {/.}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X echo {/.} ::: /a/b.c a/b.c b.c /a/b a/b b
|
2012-05-05 22:02:08 +00:00
|
|
|
|
b b b b b b
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test {#/.}"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test {#/.}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X echo {2/.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2012-05-05 22:02:08 +00:00
|
|
|
|
number2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test {#/}"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test {#/}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X echo {2/} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2012-05-05 22:02:08 +00:00
|
|
|
|
number2.c
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test {#.}"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### Test {#.}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -j1 -k -X echo {2.} ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6
|
2012-05-05 22:02:08 +00:00
|
|
|
|
a/number2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### bug #34241: --pipe should not spawn unneeded processes"
|
2012-05-05 22:02:08 +00:00
|
|
|
|
### bug #34241: --pipe should not spawn unneeded processes
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo | parallel -r -j2 -N1 --pipe md5sum -c && echo OK
|
2013-01-21 22:10:34 +00:00
|
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of quoting of > bug'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of quoting of > bug
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '>/dev/null' | parallel echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
>/dev/null
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of quoting of > bug if line continuation'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of quoting of > bug if line continuation
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo '> '; echo '> '; echo '>') | parallel --max-lines 3 echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
> > >
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of --trim illegal'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of --trim illegal
|
2014-07-15 00:40:38 +00:00
|
|
|
|
stdout parallel --trim fj ::: echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
parallel: Error: --trim must be one of: r l rl lr.
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of eof string on :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of eof string on :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -E ole echo ::: foo ole bar
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of ignore-empty string on :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of ignore-empty string on :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -r echo ::: foo '' ole bar
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo
|
|
|
|
|
ole
|
|
|
|
|
bar
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of trailing space continuation'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of trailing space continuation
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole bar
|
|
|
|
|
quux
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole bar
|
|
|
|
|
quux
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -kr -L2 echo ::: foo '' 'ole ' bar quux
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole bar
|
|
|
|
|
quux
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of trailing space continuation with -E eof'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of trailing space continuation with -E eof
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 -E bar echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | parallel -kr -L2 -E bar echo
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -kr -L2 -E bar echo ::: foo '' 'ole ' bar quux
|
2012-12-28 20:30:30 +00:00
|
|
|
|
foo ole
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of --colsep'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of --colsep
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo 'a%c%b' | parallel --colsep % echo {1} {3} {2}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a%c%b'; echo a%c%b%d) | parallel -k --colsep % echo {1} {3} {2} {4}
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a b c
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo a%c%b; echo d%f%e) | parallel -k --colsep % echo {1} {3} {2}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c
|
|
|
|
|
d e f
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} ::: a%c%b d%f%e
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c
|
|
|
|
|
d e f
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} ::: a%c%b
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --colsep % echo {1} {3} {2} {4} ::: a%c%b a%c%b%d
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a b c
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of tab as colsep'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of tab as colsep
|
2014-07-15 00:40:38 +00:00
|
|
|
|
printf 'def\tabc\njkl\tghi' | parallel -k --colsep '\t' echo {2} {1}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
abc def
|
|
|
|
|
ghi jkl
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
abc def
|
|
|
|
|
ghi jkl
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of multiple -a plus colsep'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of multiple -a plus colsep
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel --xapply -k -a <(printf 'def\njkl\n') -a <(printf 'abc\tghi\nmno\tpqr') --colsep '\t' echo {2} {1}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
abc def
|
|
|
|
|
mno jkl
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of multiple -a no colsep'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of multiple -a no colsep
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel --xapply -k -a <(printf 'ghi\npqr\n') -a <(printf 'abc\tdef\njkl\tmno') echo {2} {1}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
abc def ghi
|
|
|
|
|
jkl mno pqr
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of quoting after colsplit'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of quoting after colsplit
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel --colsep % echo {2} {1} ::: '>/dev/null%>/tmp/null'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
>/tmp/null >/dev/null
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of --colsep as regexp'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of --colsep as regexp
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a%c%%b'; echo a%c%b%d) | parallel -k --colsep %+ echo {1} {3} {2} {4}
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a b c
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k --colsep %+ echo {1} {3} {2} {4} ::: a%c%%b a%c%b%d
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a b c
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --colsep %+ echo {1} {3} {2} {4}
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a b c
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a b c d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --colsep %+ echo '"{1}_{3}_{2}_{4}"'
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a_b_c_
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a_b_c_d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of -C'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of -C
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"'
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a_b_c_
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a_b_c_d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of --trim n'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of --trim n
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo 'a% c %%b'; echo a%c% b %d) | parallel -k --trim n --colsep %+ echo '"{1}_{3}_{2}_{4}"'
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a_b_\ c\ _
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a_\ b\ _c_d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"' ::: 'a% c %%b' 'a%c% b %d'
|
2014-07-14 16:25:45 +00:00
|
|
|
|
a_b_c_
|
2012-12-28 20:30:30 +00:00
|
|
|
|
a_b_c_d
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test of bug: If input is empty string'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test of bug: If input is empty string
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo ; echo abcbdbebf;echo abc) | parallel -k --colsep b -v echo {1}{2}
|
2014-07-14 16:25:45 +00:00
|
|
|
|
echo
|
|
|
|
|
|
2012-12-28 20:30:30 +00:00
|
|
|
|
echo ac
|
|
|
|
|
ac
|
|
|
|
|
echo ac
|
|
|
|
|
ac
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test bug #34241: --pipe should not spawn unneeded processes'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test bug #34241: --pipe should not spawn unneeded processes
|
2015-01-03 17:57:37 +00:00
|
|
|
|
seq 3 | parallel -j30 --pipe --block-size 10 cat\;echo o
|
2012-12-28 20:30:30 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
|
o
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test :::: mixed with :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test :::: mixed with :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test :::: < ::: :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test :::: < ::: :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k echo {1} {2} {3} :::: <(seq 6 7) ::: 4 5 ::: 1 2 3
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test :::: < < :::: <'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test :::: < < :::: <
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k echo {1} {2} {3} :::: <(seq 6 7) <(seq 4 5) :::: <(seq 1 3)
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -a :::: < :::: <'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -a :::: < :::: <
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -a <(seq 6 7) echo {1} {2} {3} :::: <(seq 4 5) :::: <(seq 1 3)
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -a -a :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -a -a :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel -k -a <(seq 6 7) -a <(seq 4 5) echo {1} {2} {3} ::: 1 2 3
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -a - -a :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -a - -a :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 6 7 | parallel -k -a - -a <(seq 4 5) echo {1} {2} {3} ::: 1 2 3
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test :::: < - :::'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test :::: < - :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 4 5 | parallel -k echo {1} {2} {3} :::: <(seq 6 7) - ::: 1 2 3
|
2012-12-28 20:30:30 +00:00
|
|
|
|
6 4 1
|
|
|
|
|
6 4 2
|
|
|
|
|
6 4 3
|
|
|
|
|
6 5 1
|
|
|
|
|
6 5 2
|
|
|
|
|
6 5 3
|
|
|
|
|
7 4 1
|
|
|
|
|
7 4 2
|
|
|
|
|
7 4 3
|
|
|
|
|
7 5 1
|
|
|
|
|
7 5 2
|
|
|
|
|
7 5 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -E'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -E
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 100 | parallel -k -E 5 echo :::: - ::: 2 3 4 5 6 7 8 9 10 :::: <(seq 3 11)
|
2012-12-28 20:30:30 +00:00
|
|
|
|
1 2 3
|
|
|
|
|
1 2 4
|
|
|
|
|
1 3 3
|
|
|
|
|
1 3 4
|
|
|
|
|
1 4 3
|
|
|
|
|
1 4 4
|
|
|
|
|
2 2 3
|
|
|
|
|
2 2 4
|
|
|
|
|
2 3 3
|
|
|
|
|
2 3 4
|
|
|
|
|
2 4 3
|
|
|
|
|
2 4 4
|
|
|
|
|
3 2 3
|
|
|
|
|
3 2 4
|
|
|
|
|
3 3 3
|
|
|
|
|
3 3 4
|
|
|
|
|
3 4 3
|
|
|
|
|
3 4 4
|
|
|
|
|
4 2 3
|
|
|
|
|
4 2 4
|
|
|
|
|
4 3 3
|
|
|
|
|
4 3 4
|
|
|
|
|
4 4 3
|
|
|
|
|
4 4 4
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -E one empty'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -E one empty
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 100 | parallel -k -E 3 echo :::: - ::: 2 3 4 5 6 7 8 9 10 :::: <(seq 3 11)
|
2012-12-28 20:30:30 +00:00
|
|
|
|
1 2
|
|
|
|
|
2 2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -E 2 empty'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -E 2 empty
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 100 | parallel -k -E 3 echo :::: - ::: 3 4 5 6 7 8 9 10 :::: <(seq 3 11)
|
2012-12-28 20:30:30 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test -E all empty'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test -E all empty
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 3 100 | parallel -k -E 3 echo :::: - ::: 3 4 5 6 7 8 9 10 :::: <(seq 3 11)
|
|
|
|
|
echo '### Test {#}'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test {#}
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 10 | parallel -k echo {#}
|
2012-12-28 20:30:30 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
|
|
5
|
|
|
|
|
6
|
|
|
|
|
7
|
|
|
|
|
8
|
|
|
|
|
9
|
|
|
|
|
10
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Test --seqreplace and line too long'
|
2012-12-28 20:30:30 +00:00
|
|
|
|
### Test --seqreplace and line too long
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 1000 | stdout parallel -j1 -s 210 -k --seqreplace I echo IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII \|wc | uniq -c
|
2014-07-14 16:25:45 +00:00
|
|
|
|
9 1 1 101
|
|
|
|
|
90 1 1 201
|
2015-02-22 14:09:26 +00:00
|
|
|
|
1 parallel: Error: Command line too long (309 >= 210) at input 0: 100
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### bug #37042: -J foo is taken from the whole command line - not just the part before the command'
|
2013-07-03 22:50:08 +00:00
|
|
|
|
### bug #37042: -J foo is taken from the whole command line - not just the part before the command
|
2015-01-03 17:57:37 +00:00
|
|
|
|
echo '--tagstring foo' > ~/.parallel/bug_37042_profile; parallel -J bug_37042_profile echo ::: tag_with_foo; parallel --tagstring a -J bug_37042_profile echo ::: tag_with_a; parallel --tagstring a echo -J bug_37042_profile ::: print_-J_bug_37042_profile
|
2013-07-03 22:50:08 +00:00
|
|
|
|
foo tag_with_foo
|
|
|
|
|
a tag_with_a
|
|
|
|
|
a -J bug_37042_profile print_-J_bug_37042_profile
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo '### Bug introduce by fixing bug #37042'
|
2013-07-03 22:50:08 +00:00
|
|
|
|
### Bug introduce by fixing bug #37042
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel --xapply -a <(printf 'abc') --colsep '\t' echo {1}
|
2013-07-03 22:50:08 +00:00
|
|
|
|
abc
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --header with -N"
|
2013-07-03 22:50:08 +00:00
|
|
|
|
### Test --header with -N
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo h1; echo h2; echo 1a;echo 1b; echo 2a;echo 2b; echo 3a)| parallel -j1 --pipe -N2 -k --header '.*\n.*\n' echo Start\;cat \; echo Stop
|
2013-07-03 22:50:08 +00:00
|
|
|
|
Start
|
|
|
|
|
h1
|
|
|
|
|
h2
|
|
|
|
|
1a
|
|
|
|
|
1b
|
|
|
|
|
Stop
|
|
|
|
|
Start
|
|
|
|
|
h1
|
|
|
|
|
h2
|
|
|
|
|
2a
|
|
|
|
|
2b
|
|
|
|
|
Stop
|
|
|
|
|
Start
|
|
|
|
|
h1
|
|
|
|
|
h2
|
|
|
|
|
3a
|
|
|
|
|
Stop
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --header with --block 1k"
|
2013-07-03 22:50:08 +00:00
|
|
|
|
### Test --header with --block 1k
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(echo h1; echo h2; perl -e '$a="x"x110;for(1..22){print $_,$a,"\n"'})| parallel -j1 --pipe -k --block 1k --header '.*\n.*\n' echo Start\;cat \; echo Stop
|
2013-07-03 22:50:08 +00:00
|
|
|
|
Start
|
|
|
|
|
h1
|
|
|
|
|
h2
|
|
|
|
|
1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
22xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
Stop
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test --header with multiple :::"
|
2013-07-03 22:50:08 +00:00
|
|
|
|
### Test --header with multiple :::
|
2014-07-15 00:40:38 +00:00
|
|
|
|
parallel --header : echo {a} {b} {1} {2} ::: b b1 ::: a a2
|
2013-07-03 22:50:08 +00:00
|
|
|
|
a2 b1 b1 a2
|