parallel/testsuite/wanted-results/parallel-local19

295 lines
6.7 KiB
Plaintext
Raw Permalink Normal View History

### Test {.} and {}
### Test {.} with files that have no . but dir does
/tmp/test-of-{.}-parallel/subdir/file
/tmp/test-of-{.}-parallel/subdir/file{.}
ls 1-col.diff|wc;echo 1-col.diff
1 1 11
1-col.diff
ls 1-col.txt|wc;echo 1-col.txt
1 1 10
1-col.txt
ls 2-col.diff|wc;echo 2-col.diff
1 1 11
2-col.diff
ls 2-col.txt|wc;echo 2-col.txt
1 1 10
2-col.txt
ls a|wc;echo a
6 6 41
a
ls b|wc;echo b
4 4 26
b
ls \<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)|wc;echo \<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)
4 12 118
中国 (Zhōngguó)
1 1-col.diff
1 1-col.txt
1 2-col.diff
1 2-col.txt
6 a
4 b
4 中国 (Zhōngguó)
1 1-col.diff
1 1-col.txt
1 2-col.diff
1 2-col.txt
6 a
4 b
4 中国 (Zhōngguó)
touch -- 1-col/abc-1-col-1-col
touch -- 1-col/abc-1-col-1-col.diff
touch -- 1-col/abc-1-col-1-col.txt
touch -- 2-col/abc-2-col-2-col
touch -- 2-col/abc-2-col-2-col.diff
touch -- 2-col/abc-2-col-2-col.txt
touch -- a/abc-a-a
touch -- b/abc-b-b
touch -- \<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)/abc-\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)-\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)
rm -- 1-col/abc-1-col-1-col
rm -- 1-col/abc-1-col-1-col.diff
rm -- 1-col/abc-1-col-1-col.txt
rm -- 2-col/abc-2-col-2-col
rm -- 2-col/abc-2-col-2-col.diff
rm -- 2-col/abc-2-col-2-col.txt
rm -- a/abc-a-a
rm -- b/abc-b-b
rm -- \<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)/abc-\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)-\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\ \(Zh\<5C>\<5C>nggu\<5C>\<5C>\)
echo '### Test compress'
2014-02-16 15:34:47 +00:00
### Test compress
seq 5 | parallel -j2 --tag --compress 'seq {} | pv -q -L 10'
2014-02-16 15:34:47 +00:00
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
5 1
5 2
5 3
5 4
5 5
echo '### Test compress - stderr'
2014-02-16 15:34:47 +00:00
### Test compress - stderr
seq 5 | parallel -j2 --tag --compress 'seq {} | pv -q -L 10 >&2' 2>&1 >/dev/null
2014-02-16 15:34:47 +00:00
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
5 1
5 2
5 3
5 4
5 5
echo '### Test weird regexp chars'
2014-02-16 15:34:47 +00:00
### Test weird regexp chars
seq 1 6 | parallel -j1 -I :: -X echo a::b::^c::[.}c
2014-02-16 15:34:47 +00:00
a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b5^c5[.}c a6b6^c6[.}c
echo '### Test -m'
### Test -m
2016-05-17 00:11:38 +00:00
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
2016-05-17 00:11:38 +00:00
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
2016-05-17 00:11:38 +00:00
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
2016-05-17 00:11:38 +00:00
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
### Test -m with 60000 args
0891d955e7e2659ee6a88a96f3309b5c -
20 179960 1286702
echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
### Test -X with 60000 args
2016-07-22 16:10:28 +00:00
97715240fa65309902932877d24273db -
21 60000 1346682
echo '### Test -X with 60000 args and 5 expansions'
### Test -X with 60000 args and 5 expansions
2016-05-17 00:11:38 +00:00
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
34
2016-05-17 00:11:38 +00:00
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
25
2016-05-17 00:11:38 +00:00
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
21
2016-05-17 00:11:38 +00:00
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l
17
2016-05-17 00:11:38 +00:00
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l
11
echo '### Test {.} does not repeat more than {}'
2010-07-09 12:10:22 +00:00
### Test {.} does not repeat more than {}
2016-05-17 00:11:38 +00:00
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
2016-05-17 00:11:38 +00:00
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
a14.gif 15.gifb14 15c14 15
2016-05-17 00:11:38 +00:00
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
2010-07-09 12:10:22 +00:00
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
2016-05-17 00:11:38 +00:00
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
2010-07-09 12:10:22 +00:00
a14.gif 15.gifb14 15c14 15
2016-05-17 00:11:38 +00:00
echo '### Test -I with shell meta chars'
### Test -I with shell meta chars
2016-05-17 00:11:38 +00:00
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
17
2016-05-17 00:11:38 +00:00
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
17
2016-05-17 00:11:38 +00:00
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
17
2016-05-17 00:11:38 +00:00
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
17
2016-05-17 00:11:38 +00:00
echo '### Test {.}'
### Test {.}
2016-05-17 00:11:38 +00:00
echo a | parallel -qX echo "'"{.}"' "
'a'
2016-05-17 00:11:38 +00:00
echo a | parallel -qX echo "'{.}'"
'a'
2016-05-17 00:11:38 +00:00
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
begin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
end
echo '### Test -I with -X and -m'
### Test -I with -X and -m
2016-05-17 00:11:38 +00:00
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
1 1
2 1
2 2
3 1
3 2
3 3
4 1
4 2
4 3
4 4
5 1
5 2
5 3
5 4
5 5
6 1
6 2
6 3
6 4
6 5
6 6
7 1
7 2
7 3
7 4
7 5
7 6
7 7
8 1
8 2
8 3
8 4
8 5
8 6
8 7
8 8
9 1
9 2
9 3
9 4
9 5
9 6
9 7
9 8
9 9
10 1
10 2
10 3
10 4
10 5
10 6
10 7
10 8
10 9
10 10
2016-05-17 00:11:38 +00:00
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
a1 b1
a2 b1 b2
a3 b1 b2 b3
a4 b1 b2 b3 b4
a5 b1 b2 b3 b4 b5
a6 b1 b2 b3 b4 b5 b6
a7 b1 b2 b3 b4 b5 b6 b7
a8 b1 b2 b3 b4 b5 b6 b7 b8
a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
2016-05-17 00:11:38 +00:00
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
a1 b1
a2 b1 2
a3 b1 2 3
a4 b1 2 3 4
a5 b1 2 3 4 5
a6 b1 2 3 4 5 6
a7 b1 2 3 4 5 6 7
a8 b1 2 3 4 5 6 7 8
a9 b1 2 3 4 5 6 7 8 9
a10 b1 2 3 4 5 6 7 8 9 10
echo '### Test -i'
### Test -i
2016-05-17 00:11:38 +00:00
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
replace
echo '### Test --replace'
### Test --replace
2016-05-17 00:11:38 +00:00
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{.}ce
replace
echo '### Test -t'
### Test -t
2016-05-17 00:11:38 +00:00
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
echo bar
echo car
echo far
echo '### Test --verbose'
### Test --verbose
2016-05-17 00:11:38 +00:00
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
echo bar
echo car
echo far