diff --git a/src/parallel b/src/parallel index 9db52954..91f222ab 100755 --- a/src/parallel +++ b/src/parallel @@ -116,6 +116,7 @@ if($::opt_nonall or $::opt_onall) { join(" ", ((defined $::opt_u) ? "-u" : ""), ((defined $::opt_group) ? "-g" : ""), + ((defined $::opt_colsep) ? "--colsep ".shell_quote($::opt_colsep) : ""), ((defined @::opt_v) ? "-vv" : ""), ((defined $::opt_D) ? "-D" : ""), ((defined $::opt_timeout) ? "--timeout ".$::opt_timeout : ""), diff --git a/src/parallel.pod b/src/parallel.pod index 385e9c25..c07188b6 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -20,7 +20,7 @@ B<#!/usr/bin/parallel> --shebang [options] [I [arguments]] =head1 DESCRIPTION GNU B is a shell tool for executing jobs in parallel using -one or more computers. A job is can be a single command or a small +one or more computers. A job can be 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. A job can also be a command that @@ -527,7 +527,7 @@ use B<-I> instead. =item B<--joblog> I -Logfile for executed jobs. Saved a list of the executed jobs to +Logfile for executed jobs. Save a list of the executed jobs to I in the following TAB separated format: sequence number, sshlogin, start time as seconds since epoch, run time in seconds, bytes in files transfered, bytes in files returned, exit status, @@ -827,7 +827,7 @@ important. =item B<--max-line-length-allowed> -Print the maximal number characters allowed on the command line and +Print the maximal number of characters allowed on the command line and exit (used by GNU B itself to determine the line length on remote computers). @@ -3138,15 +3138,15 @@ echo 1,2,3 | parallel -vkd, "echo 'a'"{}"'b'" =head3 Startup GNU B is slow at starting up - around 250 ms. Half of the -startup time on the local computer is spent finding the maximal length -of a command line. Setting B<-s> will remove this part of the startup -time. +startup time is spent finding the maximal length of a command +line. Setting B<-s> will remove this part of the startup time. =head3 Job startup -Starting a job takes around 3 ms. This can be a big overhead if the -job takes very few ms to run. Often you can group small jobs together -using B<-X> which will make the overhead less significant. +Starting a job on the local machine takes around 3 ms. This can be a +big overhead if the job takes very few ms to run. Often you can group +small jobs together using B<-X> which will make the overhead less +significant. Using B<--ungroup> the 3 ms can be lowered to around 2 ms. @@ -3158,6 +3158,10 @@ simultaneously (Namely SSHD's MaxStartup). This test is done for each host in serial, so if your B<--sshloginfile> contains many hosts it may be slow. +If your jobs are short you may see that there are fewer jobs running +on the remove systems than expected. This is due to time spent logging +in and out. B<-M> may help here. + =head3 Disk access A single disk can normally read data faster if it reads one file at a @@ -3199,10 +3203,10 @@ or: B failed> it may be because I is not known, but it could also be -because I is an alias or a function. GNU B will -never support running aliases and functions (see why -http://www.perlmonks.org/index.pl?node_id=484296), so change your -alias or function to a script. +because I is an alias or a function. If it is a function you +need to B the function first. An alias will, however, not +work (see why http://www.perlmonks.org/index.pl?node_id=484296), so +change your alias to a script. =head1 REPORTING BUGS @@ -3224,14 +3228,16 @@ fixed in that version. A complete example that others can run that shows the problem. A combination of B, B, B, and B can reproduce -most errors. If you example requires large files, see if you can use -make them by something like B>B. +most errors. If your example requires large files, see if you can make +them by something like B>B. =back If you suspect the error is dependent on your distribution, please see -if you can reproduce the error on one of these distibutions: -http://sourceforge.net/projects/virtualboximage/files/ +if you can reproduce the error on one of these VirtualBox images: +http://sourceforge.net/projects/virtualboximage/files/ Specifying the +name of your distribution is not enough as you may have installed +software that is not the the VirtualBox images. =head1 AUTHOR diff --git a/src/parallel.texi b/src/parallel.texi index 479c2730..ae5bcf8e 100644 --- a/src/parallel.texi +++ b/src/parallel.texi @@ -29,7 +29,7 @@ parallel - build and execute shell command lines from standard input in parallel @anchor{DESCRIPTION} GNU @strong{parallel} is a shell tool for executing jobs in parallel using -one or more computers. A job is can be a single command or a small +one or more computers. A job can be 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. A job can also be a command that @@ -560,7 +560,7 @@ use @strong{-I} instead. @item @strong{--joblog} @emph{logfile} @anchor{@strong{--joblog} @emph{logfile}} -Logfile for executed jobs. Saved a list of the executed jobs to +Logfile for executed jobs. Save a list of the executed jobs to @emph{logfile} in the following TAB separated format: sequence number, sshlogin, start time as seconds since epoch, run time in seconds, bytes in files transfered, bytes in files returned, exit status, @@ -886,7 +886,7 @@ important. @item @strong{--max-line-length-allowed} @anchor{@strong{--max-line-length-allowed}} -Print the maximal number characters allowed on the command line and +Print the maximal number of characters allowed on the command line and exit (used by GNU @strong{parallel} itself to determine the line length on remote computers). @@ -3344,16 +3344,16 @@ echo 1,2,3 | parallel -vkd, "echo 'a'"@{@}"'b'" @anchor{Startup} GNU @strong{parallel} is slow at starting up - around 250 ms. Half of the -startup time on the local computer is spent finding the maximal length -of a command line. Setting @strong{-s} will remove this part of the startup -time. +startup time is spent finding the maximal length of a command +line. Setting @strong{-s} will remove this part of the startup time. @subsection Job startup @anchor{Job startup} -Starting a job takes around 3 ms. This can be a big overhead if the -job takes very few ms to run. Often you can group small jobs together -using @strong{-X} which will make the overhead less significant. +Starting a job on the local machine takes around 3 ms. This can be a +big overhead if the job takes very few ms to run. Often you can group +small jobs together using @strong{-X} which will make the overhead less +significant. Using @strong{--ungroup} the 3 ms can be lowered to around 2 ms. @@ -3366,6 +3366,10 @@ simultaneously (Namely SSHD's MaxStartup). This test is done for each host in serial, so if your @strong{--sshloginfile} contains many hosts it may be slow. +If your jobs are short you may see that there are fewer jobs running +on the remove systems than expected. This is due to time spent logging +in and out. @strong{-M} may help here. + @subsection Disk access @anchor{Disk access} @@ -3414,10 +3418,10 @@ or: @strong{open3: exec of by @emph{command} failed} it may be because @emph{command} is not known, but it could also be -because @emph{command} is an alias or a function. GNU @strong{parallel} will -never support running aliases and functions (see why -http://www.perlmonks.org/index.pl?node_id=484296), so change your -alias or function to a script. +because @emph{command} is an alias or a function. If it is a function you +need to @strong{export -f} the function first. An alias will, however, not +work (see why http://www.perlmonks.org/index.pl?node_id=484296), so +change your alias to a script. @chapter REPORTING BUGS @anchor{REPORTING BUGS} @@ -3434,14 +3438,16 @@ fixed in that version. @item A complete example that others can run that shows the problem. A combination of @strong{seq}, @strong{cat}, @strong{echo}, and @strong{sleep} can reproduce -most errors. If you example requires large files, see if you can use -make them by something like @strong{seq 1000000}>@strong{file}. +most errors. If your example requires large files, see if you can make +them by something like @strong{seq 1000000}>@strong{file}. @end itemize If you suspect the error is dependent on your distribution, please see -if you can reproduce the error on one of these distibutions: -http://sourceforge.net/projects/virtualboximage/files/ +if you can reproduce the error on one of these VirtualBox images: +http://sourceforge.net/projects/virtualboximage/files/ Specifying the +name of your distribution is not enough as you may have installed +software that is not the the VirtualBox images. @chapter AUTHOR @anchor{AUTHOR} diff --git a/testsuite/tests-to-run/test18.sh b/testsuite/tests-to-run/test18.sh index 357bda7f..fc6ef363 100644 --- a/testsuite/tests-to-run/test18.sh +++ b/testsuite/tests-to-run/test18.sh @@ -53,5 +53,3 @@ seq 1 11 | parallel -k -j10000% -S "ssh $SSHLOGIN1" echo echo '### Check -S syntax' seq 1 11 | parallel -k -j100% -S "/:" echo - - diff --git a/testsuite/tests-to-run/test46.sh b/testsuite/tests-to-run/test46.sh index c51523af..a0896c91 100644 --- a/testsuite/tests-to-run/test46.sh +++ b/testsuite/tests-to-run/test46.sh @@ -19,3 +19,6 @@ echo '### Test --return with fixed string (Gave undef warnings)' touch a echo a | stdout parallel --return b -S .. echo ">b" && echo OK rm a b + +echo '### bug #35427: quoting of {2} broken for --onall' +echo foo: /bin/ls | parallel --colsep ' ' -S localhost --onall ls {2} diff --git a/testsuite/wanted-results/test46 b/testsuite/wanted-results/test46 index afe23f92..359a01bd 100644 --- a/testsuite/wanted-results/test46 +++ b/testsuite/wanted-results/test46 @@ -4,3 +4,5 @@ original original ### Test --return with fixed string (Gave undef warnings) OK +### bug #35427: quoting of {2} broken for --onall +/bin/ls