2014-07-15 00:40:38 +00:00
|
|
|
echo '### bug #38354: -J profile_name should read from `pwd`/profile_name before ~/.parallel/profile_name'
|
2013-03-03 12:45:31 +00:00
|
|
|
### bug #38354: -J profile_name should read from `pwd`/profile_name before ~/.parallel/profile_name
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "echo echo from ./local_test_profile" > local_test_profile; parallel --profile local_test_profile echo ::: 1; rm local_test_profile
|
2013-03-03 12:45:31 +00:00
|
|
|
echo from ./local_test_profile echo 1
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "### Test --delay"
|
2012-11-26 21:57:07 +00:00
|
|
|
### Test --delay
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 9 | /usr/bin/time -f %e parallel -j3 --delay 0.57 true {} 2>&1 | perl -ne '$_ > 3.3 and print "More than 3.3 secs: OK\n"'
|
2013-06-22 12:50:48 +00:00
|
|
|
More than 3.3 secs: OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### test --sshdelay'
|
2013-03-03 12:45:31 +00:00
|
|
|
### test --sshdelay
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout /usr/bin/time -f %e parallel -j0 --sshdelay 0.5 -S localhost true ::: 1 2 3 | perl -ne 'print($_ > 1.30 ? "OK\n" : "Not OK\n")'
|
2013-03-03 12:45:31 +00:00
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "bug #37694: Empty string argument skipped when using --quote"
|
2013-03-03 12:45:31 +00:00
|
|
|
bug #37694: Empty string argument skipped when using --quote
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -q --nonall perl -le 'print scalar @ARGV' 'a' 'b' ''
|
2013-03-03 12:45:31 +00:00
|
|
|
3
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -k 5'; sleep 5
|
2011-07-28 19:09:27 +00:00
|
|
|
### Test -k 5
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -k 3'; sleep 3
|
2011-07-28 19:09:27 +00:00
|
|
|
### Test -k 3
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -k 4'; sleep 4
|
2011-07-28 19:09:27 +00:00
|
|
|
### Test -k 4
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -k 2'; sleep 2
|
2011-07-28 19:09:27 +00:00
|
|
|
### Test -k 2
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test -k 1'; sleep 1
|
2011-07-28 19:09:27 +00:00
|
|
|
### Test -k 1
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "### Computing length of command line"
|
2012-11-24 16:33:15 +00:00
|
|
|
### Computing length of command line
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 2 | parallel -k -N2 echo {1} {2}
|
2012-11-24 16:33:15 +00:00
|
|
|
1 2
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --xapply -k -a <(seq 11 12) -a <(seq 1 3) echo
|
2012-11-24 16:33:15 +00:00
|
|
|
11 1
|
|
|
|
12 2
|
2013-06-22 12:50:48 +00:00
|
|
|
11 3
|
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-11-24 16:33:15 +00:00
|
|
|
a_b_c_d
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k -C %+ echo {4} ::: 'a% c %%b'
|
2014-07-14 16:25:45 +00:00
|
|
|
|
2015-01-03 17:57:37 +00:00
|
|
|
echo "### test08"
|
2012-11-24 16:33:15 +00:00
|
|
|
### test08
|
2015-01-03 17:57:37 +00:00
|
|
|
cd input-files/test08; ls | parallel -q perl -ne '/_PRE (\d+)/ and $p=$1; /hatchname> (\d+)/ and $1!=$p and print $ARGV,"\n"' | sort
|
2012-11-24 16:33:15 +00:00
|
|
|
b
|
|
|
|
d
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 10 | parallel -j 1 echo | sort
|
2012-11-24 16:33:15 +00:00
|
|
|
1
|
|
|
|
10
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 10 | parallel -j 2 echo | sort
|
2012-11-24 16:33:15 +00:00
|
|
|
1
|
|
|
|
10
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 10 | parallel -j 3 echo | sort
|
2012-11-24 16:33:15 +00:00
|
|
|
1
|
|
|
|
10
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "bug #37956: --colsep does not default to '\t' as specified in the man page."
|
2012-12-19 14:37:36 +00:00
|
|
|
bug #37956: --colsep does not default to '\t' as specified in the man page.
|
2014-07-15 00:40:38 +00:00
|
|
|
printf "A\tB\n1\tone" | parallel --header : echo {B} {A}
|
2012-12-19 14:37:36 +00:00
|
|
|
one 1
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --tollef'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test --tollef
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel -k --tollef echo -- 1 2 3 ::: a b c | sort
|
2015-07-22 06:28:05 +00:00
|
|
|
parallel: Error: --tollef has been retired.
|
|
|
|
parallel: Error: Remove --tollef or use --gnu to override --tollef.
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --tollef --gnu'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test --tollef --gnu
|
2014-07-15 00:40:38 +00:00
|
|
|
stdout parallel -k --tollef --gnu echo ::: 1 2 3 -- a b c
|
2015-07-22 06:28:05 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
--
|
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --gnu'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test --gnu
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k --gnu echo ::: 1 2 3 -- a b c
|
2012-12-28 10:46:35 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
--
|
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test {//}'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test {//}
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: a a/b a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. a
|
|
|
|
a a/b
|
|
|
|
a/b a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: /a /a/b /a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
/ /a
|
|
|
|
/a /a/b
|
|
|
|
/a/b /a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: ./a ./a/b ./a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. ./a
|
|
|
|
./a ./a/b
|
|
|
|
./a/b ./a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: a.jpg a/b.jpg a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
. a.jpg
|
|
|
|
a a/b.jpg
|
|
|
|
a/b a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: /a.jpg /a/b.jpg /a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
/ /a.jpg
|
|
|
|
/a /a/b.jpg
|
|
|
|
/a/b /a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {//} {} ::: ./a.jpg ./a/b.jpg ./a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
. ./a.jpg
|
|
|
|
./a ./a/b.jpg
|
|
|
|
./a/b ./a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test {1//}'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test {1//}
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: a a/b a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. a
|
|
|
|
a a/b
|
|
|
|
a/b a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: /a /a/b /a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
/ /a
|
|
|
|
/a /a/b
|
|
|
|
/a/b /a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: ./a ./a/b ./a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. ./a
|
|
|
|
./a ./a/b
|
|
|
|
./a/b ./a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: a.jpg a/b.jpg a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
. a.jpg
|
|
|
|
a a/b.jpg
|
|
|
|
a/b a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: /a.jpg /a/b.jpg /a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
/ /a.jpg
|
|
|
|
/a /a/b.jpg
|
|
|
|
/a/b /a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -k echo {1//} {} ::: ./a.jpg ./a/b.jpg ./a/b/c.jpg
|
2012-12-28 10:46:35 +00:00
|
|
|
. ./a.jpg
|
|
|
|
./a ./a/b.jpg
|
|
|
|
./a/b ./a/b/c.jpg
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --dnr'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test --dnr
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --dnr II -k echo II {} ::: a a/b a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. a
|
|
|
|
a a/b
|
|
|
|
a/b a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test --dirnamereplace'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test --dirnamereplace
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --dirnamereplace II -k echo II {} ::: a a/b a/b/c
|
2012-12-28 10:46:35 +00:00
|
|
|
. a
|
|
|
|
a a/b
|
|
|
|
a/b a/b/c
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Test https://savannah.gnu.org/bugs/index.php?31716'
|
2012-12-28 10:46:35 +00:00
|
|
|
### Test https://savannah.gnu.org/bugs/index.php?31716
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 5 | stdout parallel -k -l echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 1 5 | stdout parallel -k -l 1 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -l -0'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -l -0
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -l -0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -l'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -l
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -l 1'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -l 1
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l 1 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -l 0'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -l 0
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l 0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -L -0 - -0 is argument for -L'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -L -0 - -0 is argument for -L
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -L -0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -L 0 - -L always takes arg'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -L 0 - -L always takes arg
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -L 0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -L 0 - -L always takes arg'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -L 0 - -L always takes arg
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -L 0 -0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
|
|
|
OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -e -0'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -e -0
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -e -0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -e eof'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -e eof
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -e eof echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -i -0'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -i -0
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -i -0 echo {} OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### -k -0 -i repl'
|
2012-12-28 10:46:35 +00:00
|
|
|
### -k -0 -i repl
|
2014-07-15 00:40:38 +00:00
|
|
|
printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -i repl echo repl OK
|
2012-12-28 10:46:35 +00:00
|
|
|
1 OK
|
|
|
|
2 OK
|
|
|
|
3 OK
|
|
|
|
4 OK
|
|
|
|
5 OK
|
2014-07-15 00:40:38 +00:00
|
|
|
echo '### Negative replacement strings'
|
2013-02-13 00:15:37 +00:00
|
|
|
### Negative replacement strings
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -X -j1 -N 6 echo {-1}orrec{1} ::: t B X D E c
|
2013-02-13 00:15:37 +00:00
|
|
|
correct
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel -N 6 echo {-1}orrect ::: A B X D E c
|
2013-02-13 00:15:37 +00:00
|
|
|
correct
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --colsep ' ' echo '{2} + {4} = {2} + {-1}=' '$(( {2} + {-1} ))' ::: "1 2 3 4"
|
2013-02-13 00:15:37 +00:00
|
|
|
2 + 4 = 2 + 4= 6
|
2014-07-15 00:40:38 +00:00
|
|
|
parallel --colsep ' ' echo '{-3}orrect' ::: "1 c 3 4"
|
2013-02-13 00:15:37 +00:00
|
|
|
correct
|
2014-07-15 00:40:38 +00:00
|
|
|
echo 'bug #38439: "open files" with --files --pipe blocks after a while'
|
2013-03-04 20:50:51 +00:00
|
|
|
bug #38439: "open files" with --files --pipe blocks after a while
|
2015-07-22 06:28:05 +00:00
|
|
|
ulimit -n 20; yes "`seq 3000`" |head -c 20M | parallel --pipe -k echo {#} of 21
|
|
|
|
1 of 21
|
|
|
|
2 of 21
|
|
|
|
3 of 21
|
|
|
|
4 of 21
|
|
|
|
5 of 21
|
|
|
|
6 of 21
|
|
|
|
7 of 21
|
|
|
|
8 of 21
|
|
|
|
9 of 21
|
|
|
|
10 of 21
|
|
|
|
11 of 21
|
|
|
|
12 of 21
|
|
|
|
13 of 21
|
|
|
|
14 of 21
|
|
|
|
15 of 21
|
|
|
|
16 of 21
|
|
|
|
17 of 21
|
|
|
|
18 of 21
|
|
|
|
19 of 21
|
|
|
|
20 of 21
|
|
|
|
21 of 21
|
2015-01-03 17:57:37 +00:00
|
|
|
parallel: Warning: Only enough file handles to run 1 jobs in parallel.
|
2016-08-14 14:54:27 +00:00
|
|
|
parallel: Warning: Running 'parallel -j0 -N 1 --pipe parallel -j0' or
|
2017-04-17 14:25:58 +00:00
|
|
|
parallel: Warning: raising 'ulimit -n' or 'nofile' in /etc/security/limits.conf
|
|
|
|
parallel: Warning: or /proc/sys/fs/file-max may help.
|
2014-07-15 00:40:38 +00:00
|
|
|
echo 'bug #34241: --pipe should not spawn unneeded processes - part 2'
|
2013-04-11 19:55:33 +00:00
|
|
|
bug #34241: --pipe should not spawn unneeded processes - part 2
|
2014-07-15 00:40:38 +00:00
|
|
|
seq 500 | parallel --tmpdir . -j10 --pipe --block 1k --files wc >/dev/null; ls *.par | wc -l; rm *.par; seq 500 | parallel --tmpdir . -j10 --pipe --block 1k --files --dry-run wc >/dev/null; echo No .par should exist; stdout ls *.par
|
2013-04-11 19:55:33 +00:00
|
|
|
2
|
|
|
|
No .par should exist
|
2017-01-01 16:51:14 +00:00
|
|
|
ls: cannot access '*.par': No such file or directory
|
2014-07-15 00:40:38 +00:00
|
|
|
echo "bug: --gnu was ignored if env var started with space: PARALLEL=' --gnu'"
|
2014-01-13 03:57:40 +00:00
|
|
|
bug: --gnu was ignored if env var started with space: PARALLEL=' --gnu'
|
2014-07-15 00:40:38 +00:00
|
|
|
export PARALLEL=" -v" && parallel echo ::: 'space in envvar OK'
|
2014-01-13 03:57:40 +00:00
|
|
|
echo space\ in\ envvar\ OK
|
|
|
|
space in envvar OK
|