diff --git a/doc/release_new_version b/doc/release_new_version index de8e0635..922b0b57 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -87,19 +87,13 @@ download at: http://ftp.gnu.org/gnu/parallel/ New in this release: -* Arguments can now be given on the command line. Example: - parallel bzip2 ::: *.txt +* With --colsep a table can be used as input. Example: + cat table | parallel --colsep '\s+' echo col1 {1} col2 {2} -* xapply like functionality. Example: - parallel diff {1} {2} :::: filelist1 filelist2 - parallel diff {1} {2} ">"{1.}-{2.}.diff :::: filelist1 filelist2 +* --trim can remove white space around arguments. -* Arch Linux package. Thanks to Peter Simons - -* Mandriva package. Thanks to Sandro Cazzaniga - -* -L -l -n -s now implies -X unless -m is set +* Zero install package. Thanks to Tim Cuthbertson = About GNU Parallel = diff --git a/packager/0install/parallel.xml b/packager/0install/parallel.xml new file mode 100644 index 00000000..bf77d1c6 --- /dev/null +++ b/packager/0install/parallel.xml @@ -0,0 +1,42 @@ + + + + GNU parallel + a shell tool for executing jobs in parallel locally or using remote computers + +GNU parallel is a shell tool for executing jobs in parallel locally or +using remote computers. A job is typically a single command or a small +script that has to be run for each of the lines in the input. The +typical input is a list of files, a list of hosts, a list of users, a +list of URLs, or a list of tables. + +If you use xargs today you will find GNU parallel very easy to use as GNU +parallel is written to have the same options as xargs. If you write loops in +shell, you will find GNU parallel may be able to replace most of the loops and +make them run faster by running several jobs in parallel. If you use ppss or +pexec you will find GNU parallel will often make the command easier to read. + +GNU parallel makes sure output from the commands is the same output as you would +get had you run the commands sequentially. This makes it possible to use output +from GNU parallel as input for other programs. + +For each line of input GNU parallel will execute command with the line as +arguments. If no command is given, the line of input is executed. Several lines +will be run in parallel. GNU parallel can often be used as a substitute for +xargs or cat | sh. + http://www.gnu.org/software/parallel/ + Utility + + + + + + + + + + diff --git a/src/parallel b/src/parallel index 9df626ff..297e4833 100755 --- a/src/parallel +++ b/src/parallel @@ -150,7 +150,7 @@ B<{6}> will refer to the line with the same line number from the 6th file. -=item B<--arg-file-sep> I (unimplemented) +=item B<--arg-file-sep> I (beta testing) Use I instead of B<::::> as separator string between command and argument files. Useful if B<::::> is used for something else by the @@ -683,7 +683,7 @@ Transfer, Return, Cleanup. Short hand for: B<--transfer> B<--return> I B<--cleanup> -=item B<--trim> (unimplemented) +=item B<--trim> (beta testing) Trim white space in input. @@ -3145,7 +3145,7 @@ sub get_next_arg_from_fh { $arg .= get_next_arg_from_fh($fh); } } - if($::opt_colsep) { + if(not @$unget_ref and $::opt_colsep) { # split this into columns if($Global::trim ne 'n') { push @$unget_ref, split /$::opt_colsep/o, $arg; @@ -3154,11 +3154,13 @@ sub get_next_arg_from_fh { } $::opt_N = $#$unget_ref+1; $Global::max_number_of_args = $::opt_N; + debug("unget_ref: @$unget_ref\n"); $arg = shift @$unget_ref; } if($Global::input_is_filename) { $arg = shell_quote($arg); } + debug($arg); return $arg; }