echo '### bug #38354: -J profile_name should read from `pwd`/profile_name before ~/.parallel/profile_name' ### bug #38354: -J profile_name should read from `pwd`/profile_name before ~/.parallel/profile_name echo "echo echo from ./local_test_profile" > local_test_profile; parallel --profile local_test_profile echo ::: 1; rm local_test_profile echo from ./local_test_profile echo 1 echo "### Test --delay" ### Test --delay 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"' More than 3.3 secs: OK echo '### test --sshdelay' ### test --sshdelay 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")' OK echo '### bug #38299: --resume-failed -k' ### bug #38299: --resume-failed -k rm /tmp/joblog-38299; parallel -k --resume-failed --joblog /tmp/joblog-38299 echo job{#} val {}\;exit {} ::: 0 1 2 3 0 1; echo try 2. Gives failing - not 0; parallel -k --resume-failed --joblog /tmp/joblog-38299 echo job{#} val {}\;exit {} ::: 0 1 2 3 0 1; echo with exit 0; parallel -k --resume-failed --joblog /tmp/joblog-38299 echo job{#} val {}\;exit 0 ::: 0 1 2 3 0 1; echo try 2 again. Gives empty; parallel -k --resume-failed --joblog /tmp/joblog-38299 echo job{#} val {}\;exit {} ::: 0 1 2 3 0 1 job1 val 0 job2 val 1 job3 val 2 job4 val 3 job5 val 0 job6 val 1 try 2. Gives failing - not 0 job2 val 1 job3 val 2 job4 val 3 job6 val 1 with exit 0 job2 val 1 job3 val 2 job4 val 3 job6 val 1 try 2 again. Gives empty echo '### --resume -k' ### --resume -k rm -f /tmp/joblog-resume; parallel -k --resume --joblog /tmp/joblog-resume echo job{}id\;exit {} ::: 0 1 2 3 0 5; echo try 2 = nothing; parallel -k --resume --joblog /tmp/joblog-resume echo job{}id\;exit {} ::: 0 1 2 3 0 5; echo two extra; parallel -k --resume --joblog /tmp/joblog-resume echo job{}id\;exit 0 ::: 0 1 2 3 0 5 6 7 job0id job1id job2id job3id job0id job5id try 2 = nothing two extra job6id job7id echo "bug #37694: Empty string argument skipped when using --quote" bug #37694: Empty string argument skipped when using --quote parallel -q --nonall perl -le 'print scalar @ARGV' 'a' 'b' '' 3 echo '### Test -k 5'; sleep 5 ### Test -k 5 echo '### Test -k 3'; sleep 3 ### Test -k 3 echo '### Test -k 4'; sleep 4 ### Test -k 4 echo '### Test -k 2'; sleep 2 ### Test -k 2 echo '### Test -k 1'; sleep 1 ### Test -k 1 echo "### Computing length of command line" ### Computing length of command line seq 1 2 | parallel -k -N2 echo {1} {2} 1 2 parallel --xapply -k -a <(seq 11 12) -a <(seq 1 3) echo 11 1 12 2 11 3 parallel -k -C %+ echo '"{1}_{3}_{2}_{4}"' ::: 'a% c %%b' 'a%c% b %d' a_b_c_ a_b_c_d parallel -k -C %+ echo {4} ::: 'a% c %%b' echo "### test08"; cd input-files/test08; ls | parallel -q perl -ne '/_PRE (\d+)/ and $p=$1; /hatchname> (\d+)/ and $1!=$p and print $ARGV,"\n"' | sort; ### test08 b d seq 1 10 | parallel -j 1 echo | sort 1 10 2 3 4 5 6 7 8 9 seq 1 10 | parallel -j 2 echo | sort 1 10 2 3 4 5 6 7 8 9 seq 1 10 | parallel -j 3 echo | sort 1 10 2 3 4 5 6 7 8 9 echo "bug #37956: --colsep does not default to '\t' as specified in the man page." bug #37956: --colsep does not default to '\t' as specified in the man page. printf "A\tB\n1\tone" | parallel --header : echo {B} {A} one 1 echo '### Test --tollef' ### Test --tollef stdout parallel -k --tollef echo -- 1 2 3 ::: a b c | sort parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l. parallel: Error: -B has been retired. Use --bf. parallel: Error: -H has been retired. Use --halt. parallel: Error: -T has been retired. Use --tty. parallel: Error: -U has been retired. Use --er. parallel: Error: -W has been retired. Use --wd. parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -g has been retired. Use --group. echo '### Test --tollef --gnu' ### Test --tollef --gnu stdout parallel -k --tollef --gnu echo ::: 1 2 3 -- a b c parallel: Error: -g has been retired. Use --group. parallel: Error: -B has been retired. Use --bf. parallel: Error: -T has been retired. Use --tty. parallel: Error: -U has been retired. Use --er. parallel: Error: -W has been retired. Use --wd. parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -H has been retired. Use --halt. parallel: Error: --tollef has been retired. Use -u -q --arg-sep -- and --load for -l. echo '### Test --gnu' ### Test --gnu parallel -k --gnu echo ::: 1 2 3 -- a b c 1 2 3 -- a b c echo '### Test {//}' ### Test {//} parallel -k echo {//} {} ::: a a/b a/b/c . a a a/b a/b a/b/c parallel -k echo {//} {} ::: /a /a/b /a/b/c / /a /a /a/b /a/b /a/b/c parallel -k echo {//} {} ::: ./a ./a/b ./a/b/c . ./a ./a ./a/b ./a/b ./a/b/c parallel -k echo {//} {} ::: a.jpg a/b.jpg a/b/c.jpg . a.jpg a a/b.jpg a/b a/b/c.jpg parallel -k echo {//} {} ::: /a.jpg /a/b.jpg /a/b/c.jpg / /a.jpg /a /a/b.jpg /a/b /a/b/c.jpg parallel -k echo {//} {} ::: ./a.jpg ./a/b.jpg ./a/b/c.jpg . ./a.jpg ./a ./a/b.jpg ./a/b ./a/b/c.jpg echo '### Test {1//}' ### Test {1//} parallel -k echo {1//} {} ::: a a/b a/b/c . a a a/b a/b a/b/c parallel -k echo {1//} {} ::: /a /a/b /a/b/c / /a /a /a/b /a/b /a/b/c parallel -k echo {1//} {} ::: ./a ./a/b ./a/b/c . ./a ./a ./a/b ./a/b ./a/b/c parallel -k echo {1//} {} ::: a.jpg a/b.jpg a/b/c.jpg . a.jpg a a/b.jpg a/b a/b/c.jpg parallel -k echo {1//} {} ::: /a.jpg /a/b.jpg /a/b/c.jpg / /a.jpg /a /a/b.jpg /a/b /a/b/c.jpg parallel -k echo {1//} {} ::: ./a.jpg ./a/b.jpg ./a/b/c.jpg . ./a.jpg ./a ./a/b.jpg ./a/b ./a/b/c.jpg echo '### Test --dnr' ### Test --dnr parallel --dnr II -k echo II {} ::: a a/b a/b/c . a a a/b a/b a/b/c echo '### Test --dirnamereplace' ### Test --dirnamereplace parallel --dirnamereplace II -k echo II {} ::: a a/b a/b/c . a a a/b a/b a/b/c echo '### Test https://savannah.gnu.org/bugs/index.php?31716' ### Test https://savannah.gnu.org/bugs/index.php?31716 seq 1 5 | stdout parallel -k -l echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK seq 1 5 | stdout parallel -k -l 1 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -l -0' ### -k -l -0 printf '1\0002\0003\0004\0005\000' | stdout parallel -k -l -0 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -l' ### -k -0 -l printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -l 1' ### -k -0 -l 1 printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l 1 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -l 0' ### -k -0 -l 0 printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -l 0 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -L -0 - -0 is argument for -L' ### -k -0 -L -0 - -0 is argument for -L printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -L -0 echo {} OK OK OK OK OK OK echo '### -k -0 -L 0 - -L always takes arg' ### -k -0 -L 0 - -L always takes arg printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -L 0 echo {} OK OK OK OK OK OK echo '### -k -0 -L 0 - -L always takes arg' ### -k -0 -L 0 - -L always takes arg printf '1\0002\0003\0004\0005\000' | stdout parallel -k -L 0 -0 echo {} OK OK OK OK OK OK echo '### -k -e -0' ### -k -e -0 printf '1\0002\0003\0004\0005\000' | stdout parallel -k -e -0 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -e eof' ### -k -0 -e eof printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -e eof echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -i -0' ### -k -i -0 printf '1\0002\0003\0004\0005\000' | stdout parallel -k -i -0 echo {} OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### -k -0 -i repl' ### -k -0 -i repl printf '1\0002\0003\0004\0005\000' | stdout parallel -k -0 -i repl echo repl OK 1 OK 2 OK 3 OK 4 OK 5 OK echo '### Negative replacement strings' ### Negative replacement strings parallel -X -j1 -N 6 echo {-1}orrec{1} ::: t B X D E c correct parallel -N 6 echo {-1}orrect ::: A B X D E c correct parallel --colsep ' ' echo '{2} + {4} = {2} + {-1}=' '$(( {2} + {-1} ))' ::: "1 2 3 4" 2 + 4 = 2 + 4= 6 parallel --colsep ' ' echo '{-3}orrect' ::: "1 c 3 4" correct echo 'bug #38439: "open files" with --files --pipe blocks after a while' bug #38439: "open files" with --files --pipe blocks after a while ulimit -n 20; yes |head -n 10M | parallel --pipe -k echo {#} of 20 1 of 20 2 of 20 3 of 20 4 of 20 5 of 20 6 of 20 7 of 20 8 of 20 9 of 20 10 of 20 11 of 20 12 of 20 13 of 20 14 of 20 15 of 20 16 of 20 17 of 20 18 of 20 19 of 20 20 of 20 echo 'bug #34241: --pipe should not spawn unneeded processes - part 2' bug #34241: --pipe should not spawn unneeded processes - part 2 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 2 No .par should exist ls: cannot access *.par: No such file or directory echo "bug: --gnu was ignored if env var started with space: PARALLEL=' --gnu'" bug: --gnu was ignored if env var started with space: PARALLEL=' --gnu' export PARALLEL=" -v" && parallel echo ::: 'space in envvar OK' echo space\ in\ envvar\ OK space in envvar OK