diff --git a/doc/release_new_version b/doc/release_new_version index 57b6f198..80913d93 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -212,9 +212,9 @@ cc:Tim Cuthbertson , Ryoichiro Suzuki , Jesse Alama -Subject: GNU Parallel 20150822 ('<<>>') released <<[stable]>> +Subject: GNU Parallel 20150822 ('Aylan Kurdi') released <<[stable]>> -GNU Parallel 20150922 ('<<>>') <<[stable]>> has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ +GNU Parallel 20150922 ('Aylan Kurdi') <<[stable]>> has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ <> @@ -241,6 +241,10 @@ New in this release: * Crop and resize images with bash and ImageMagick https://www.simonholywell.com/post/2015/08/image-resize-crop-bash-imagemagick/ +* Three Ways to Script Processes in Parallel http://www.codeword.xyz/2015/09/02/three-ways-to-script-processes-in-parallel/ + +* L’Exploration De Données Twitter http://blog.inovia-conseil.fr/?p=233 + * Bug fixes and man page updates. GNU Parallel - For people who live life in the parallel lane. diff --git a/src/parallel b/src/parallel index 5d7d0bec..e6e982ec 100755 --- a/src/parallel +++ b/src/parallel @@ -78,9 +78,7 @@ if($opt::header and not $opt::pipe) { for my $s (split /$delimiter/o, $line) { ::debug("init", "Colname: '$s'"); # Replace {colname} with {2} - # TODO accept configurable short hands - # TODO how to deal with headers in {=...=} - for(@command) { + for(@command,@Global::ret_files) { s:\{$s(|/|//|\.|/\.)\}:\{$id$1\}:g; } $Global::input_source_header{$id} = $s; @@ -1099,7 +1097,7 @@ sub parse_options { sub init_globals { # Defaults: - $Global::version = 20150823; + $Global::version = 20150909; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; @@ -8322,6 +8320,7 @@ sub new { } } # Replace replacement strings with {= perl expr =} + # '{=' 'perlexpr' '=}' => '{= perlexpr =}' @command = merge_rpl_parts(@command); # Protect matching inside {= perl expr =} diff --git a/src/parallel.pod b/src/parallel.pod index 98bbbbd1..ab1c6c29 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -3900,11 +3900,8 @@ B can run jobs in parallel, but requires a crafted Makefile to do this. That results in extra quoting to get filename containing newline to work correctly. -B has no support for grouping the output, therefore output -may run together, e.g. the first half of a line is from one process -and the last half of the line is from another process. The example -B cannot be done reliably with B because of -this. +B computes a dependency graph before running jobs. Jobs run +by GNU B does not depend on eachother. (Very early versions of GNU B were coincidently implemented using B). diff --git a/testsuite/Makefile b/testsuite/Makefile index ec1fbe33..78a8a433 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -40,7 +40,7 @@ prereqlocal: installparallel which timeout || (echo timeout is required for testsuite; /bin/false) prereqremote: installparallel startvm - parallel --timeout 5 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true) + parallel --timeout 10 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true) startvm: # Make sure we can reach the virtual machines diff --git a/testsuite/tests-to-run/parallel-local-ssh3.sh b/testsuite/tests-to-run/parallel-local-ssh3.sh index 1bd59ab5..c8238982 100644 --- a/testsuite/tests-to-run/parallel-local-ssh3.sh +++ b/testsuite/tests-to-run/parallel-local-ssh3.sh @@ -1,7 +1,7 @@ #!/bin/bash # SSH only allowed to localhost/lo -cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj2 -k --joblog /tmp/jl-`basename $0` -L1 +cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj2 --retries 3 -k --joblog /tmp/jl-`basename $0` -L1 echo '### --hostgroup force ncpu' parallel --delay 0.1 --hgrp -S @g1/1/parallel@lo -S @g2/3/lo whoami\;sleep 0.2{} ::: {1..8} | sort @@ -64,4 +64,14 @@ echo '### Uniq {=perlexpr=} in return - not used in command' echo '### functions and --nice' myfunc() { echo OK $*; }; export -f myfunc; parallel --nice 10 --env myfunc -S parallel@lo myfunc ::: func +echo '### bug #45906: {= in header =}' + rm -f returnfile45906; + parallel --rpl '{G} $_=lc($_)' -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: RETURNFILE45906; + ls returnfile45906 + +echo '### bug #45907: --header : + --return {header}' + rm returnfile45907; + ppar --header : -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: G returnfile45907; + ls returnfile45907 + EOF diff --git a/testsuite/wanted-results/parallel-local-ssh3 b/testsuite/wanted-results/parallel-local-ssh3 index 6a1f2c52..46c3071f 100644 --- a/testsuite/wanted-results/parallel-local-ssh3 +++ b/testsuite/wanted-results/parallel-local-ssh3 @@ -105,3 +105,11 @@ echo '### functions and --nice' ### functions and --nice myfunc() { echo OK $*; }; export -f myfunc; parallel --nice 10 --env myfunc -S parallel@lo myfunc ::: func OK func +echo '### bug #45906: {= in header =}' +### bug #45906: {= in header =} + rm -f returnfile45906; parallel --rpl '{G} $_=lc($_)' -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: RETURNFILE45906; ls returnfile45906 +returnfile45906 +echo '### bug #45907: --header : + --return {header}' +### bug #45907: --header : + --return {header} + rm returnfile45907; ppar --header : -S parallel@lo --return {G} --cleanup echo {G} '>' {G} ::: G returnfile45907; ls returnfile45907 +returnfile45907