mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 22:17:54 +00:00
{= perlexpr =} passes testsuite.
This commit is contained in:
parent
0725d2e2f5
commit
4995630a62
|
@ -24,7 +24,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
$Global::progname="niceload";
|
$Global::progname="niceload";
|
||||||
$Global::version = 20140622;
|
$Global::version = 20140711;
|
||||||
Getopt::Long::Configure("bundling","require_order");
|
Getopt::Long::Configure("bundling","require_order");
|
||||||
get_options_from_array(\@ARGV) || die_usage();
|
get_options_from_array(\@ARGV) || die_usage();
|
||||||
if($opt::version) {
|
if($opt::version) {
|
||||||
|
|
905
src/parallel
905
src/parallel
File diff suppressed because it is too large
Load diff
BIN
src/parallel.pdf
BIN
src/parallel.pdf
Binary file not shown.
|
@ -93,8 +93,9 @@ B<exportf> to export and to set $SHELL to bash:
|
||||||
exportf my_func
|
exportf my_func
|
||||||
SHELL=/bin/bash parallel "my_func {}" ::: 1 2
|
SHELL=/bin/bash parallel "my_func {}" ::: 1 2
|
||||||
|
|
||||||
|
The command cannot contain the character \257 (¯).
|
||||||
|
|
||||||
=item B<{}>
|
=item B<{}> (alpha testing)
|
||||||
|
|
||||||
Input line. This replacement string will be replaced by a full line
|
Input line. This replacement string will be replaced by a full line
|
||||||
read from the input source. The input source is normally stdin
|
read from the input source. The input source is normally stdin
|
||||||
|
@ -107,7 +108,7 @@ If the command line contains no replacement strings then B<{}> will be
|
||||||
appended to the command line.
|
appended to the command line.
|
||||||
|
|
||||||
|
|
||||||
=item B<{.}>
|
=item B<{.}> (alpha testing)
|
||||||
|
|
||||||
Input line without extension. This replacement string will be replaced
|
Input line without extension. This replacement string will be replaced
|
||||||
by the input with the extension removed. If the input line contains
|
by the input with the extension removed. If the input line contains
|
||||||
|
@ -123,7 +124,7 @@ The replacement string B<{.}> can be changed with B<--er>.
|
||||||
To understand replacement strings see B<{}>.
|
To understand replacement strings see B<{}>.
|
||||||
|
|
||||||
|
|
||||||
=item B<{/}>
|
=item B<{/}> (alpha testing)
|
||||||
|
|
||||||
Basename of input line. This replacement string will be replaced by
|
Basename of input line. This replacement string will be replaced by
|
||||||
the input with the directory part removed.
|
the input with the directory part removed.
|
||||||
|
@ -134,7 +135,7 @@ B<--basenamereplace>.
|
||||||
To understand replacement strings see B<{}>.
|
To understand replacement strings see B<{}>.
|
||||||
|
|
||||||
|
|
||||||
=item B<{//}>
|
=item B<{//}> (alpha testing)
|
||||||
|
|
||||||
Dirname of input line. This replacement string will be replaced by the
|
Dirname of input line. This replacement string will be replaced by the
|
||||||
dir of the input line. See B<dirname>(1).
|
dir of the input line. See B<dirname>(1).
|
||||||
|
@ -145,7 +146,7 @@ B<--dirnamereplace>.
|
||||||
To understand replacement strings see B<{}>.
|
To understand replacement strings see B<{}>.
|
||||||
|
|
||||||
|
|
||||||
=item B<{/.}>
|
=item B<{/.}> (alpha testing)
|
||||||
|
|
||||||
Basename of input line without extension. This replacement string will
|
Basename of input line without extension. This replacement string will
|
||||||
be replaced by the input with the directory and extension part
|
be replaced by the input with the directory and extension part
|
||||||
|
@ -157,7 +158,7 @@ B<--basenameextensionreplace>.
|
||||||
To understand replacement strings see B<{}>.
|
To understand replacement strings see B<{}>.
|
||||||
|
|
||||||
|
|
||||||
=item B<{#}>
|
=item B<{#}> (alpha testing)
|
||||||
|
|
||||||
Sequence number of the job to run. This replacement string will be
|
Sequence number of the job to run. This replacement string will be
|
||||||
replaced by the sequence number of the job being run. It contains the
|
replaced by the sequence number of the job being run. It contains the
|
||||||
|
@ -243,6 +244,27 @@ directory (if any) and extension removed.
|
||||||
To understand positional replacement strings see B<{>I<n>B<}>.
|
To understand positional replacement strings see B<{>I<n>B<}>.
|
||||||
|
|
||||||
|
|
||||||
|
=item B<{=>I<perl expression>B<=}>
|
||||||
|
|
||||||
|
Replace with calculated I<perl expression>. B<$_> will contain the
|
||||||
|
same as B<{}>. After evaluating I<perl expression> B<$_> will be used
|
||||||
|
as the value. It is recommended to only change $_ but you have full
|
||||||
|
access to all of GNU B<parallel>'s internal functions and data
|
||||||
|
structures.
|
||||||
|
|
||||||
|
The B<{=>I<perl expression>B<=}> must be given as a single string.
|
||||||
|
|
||||||
|
See also: B<--rpl> B<--parens>
|
||||||
|
|
||||||
|
|
||||||
|
=item B<{=>I<n> I<perl expression>B<=}>
|
||||||
|
|
||||||
|
Positional equivalent to B<{= perl expression =}>. To understand
|
||||||
|
positional replacement strings see B<{>I<n>B<}>.
|
||||||
|
|
||||||
|
See also: B<{= perl expression =}> B<{>I<n>B<}>.
|
||||||
|
|
||||||
|
|
||||||
=item B<:::> I<arguments>
|
=item B<:::> I<arguments>
|
||||||
|
|
||||||
Use arguments from the command line as input source instead of stdin
|
Use arguments from the command line as input source instead of stdin
|
||||||
|
@ -800,7 +822,7 @@ B<-l 0> is an alias for B<-l 1>.
|
||||||
Implies B<-X> unless B<-m>, B<--xargs>, or B<--pipe> is set.
|
Implies B<-X> unless B<-m>, B<--xargs>, or B<--pipe> is set.
|
||||||
|
|
||||||
|
|
||||||
=item B<--line-buffer> (beta testing)
|
=item B<--line-buffer>
|
||||||
|
|
||||||
Buffer output on line basis. B<--group> will keep the output together
|
Buffer output on line basis. B<--group> will keep the output together
|
||||||
for a whole job. B<--ungroup> allows output to mixup with half a line
|
for a whole job. B<--ungroup> allows output to mixup with half a line
|
||||||
|
@ -935,7 +957,7 @@ B<--files> is often used with B<--pipe>.
|
||||||
See also: B<--recstart>, B<--recend>, B<--fifo>, B<--cat>, B<--pipepart>.
|
See also: B<--recstart>, B<--recend>, B<--fifo>, B<--cat>, B<--pipepart>.
|
||||||
|
|
||||||
|
|
||||||
=item B<--pipepart> (alpha testing)
|
=item B<--pipepart> (beta testing)
|
||||||
|
|
||||||
Pipe parts of a physical file. B<--pipepart> works similar to
|
Pipe parts of a physical file. B<--pipepart> works similar to
|
||||||
B<--pipe>, but is much faster. It has a few limitations:
|
B<--pipe>, but is much faster. It has a few limitations:
|
||||||
|
@ -1058,6 +1080,21 @@ from the terminal. Only run the command line if the response starts
|
||||||
with 'y' or 'Y'. Implies B<-t>.
|
with 'y' or 'Y'. Implies B<-t>.
|
||||||
|
|
||||||
|
|
||||||
|
=item B<--parens> I<parensstring> (alpha testing)
|
||||||
|
|
||||||
|
Use to define start and end parenthesis for B<{= perl expression =}>. The
|
||||||
|
left and the right parenthesis can be multiple characters and are
|
||||||
|
assumed to be the same length. The default is B<{==}> giving
|
||||||
|
B<{=> as the start parenthesis and B<=}> as the end parenthesis.
|
||||||
|
|
||||||
|
Another useful setting is B<,,,,> which would make both parenthesis
|
||||||
|
B<,,>:
|
||||||
|
|
||||||
|
parallel --parens ,,,, echo foo is ,,s/I/O/g,, ::: FII
|
||||||
|
|
||||||
|
See also: B<--rpl> B<{= perl expression =}>
|
||||||
|
|
||||||
|
|
||||||
=item B<--profile> I<profilename>
|
=item B<--profile> I<profilename>
|
||||||
|
|
||||||
=item B<-J> I<profilename>
|
=item B<-J> I<profilename>
|
||||||
|
@ -1281,6 +1318,29 @@ B<--keep-order> will not work with B<--round-robin> as it is
|
||||||
impossible to track which input block corresponds to which output.
|
impossible to track which input block corresponds to which output.
|
||||||
|
|
||||||
|
|
||||||
|
=item B<--rpl> 'I<tag> I<perl expression>' (alpha testing)
|
||||||
|
|
||||||
|
Use I<tag> as a replacement string for I<perl expression>. This makes
|
||||||
|
it possible to define your own replacement strings. GNU B<parallel>'s
|
||||||
|
7 replacement strings are implemented as:
|
||||||
|
|
||||||
|
--rpl '{} '
|
||||||
|
--rpl '{#} $_=$job->seq()'
|
||||||
|
--rpl '{%} $_=$job->slot()'
|
||||||
|
--rpl '{/} s:.*/::'
|
||||||
|
--rpl '{//} $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);'
|
||||||
|
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
|
||||||
|
--rpl '{.} s:\.[^/.]+$::'
|
||||||
|
|
||||||
|
If the user defined replacement string starts with '{' it can also be
|
||||||
|
used as a positional replacement string (like B<{2.}>).
|
||||||
|
|
||||||
|
It is recommended to only change $_ but you have full access to all
|
||||||
|
of GNU B<parallel>'s internal functions and data structures.
|
||||||
|
|
||||||
|
See also: B<{= perl expression =}> B<--parens>
|
||||||
|
|
||||||
|
|
||||||
=item B<--max-chars>=I<max-chars>
|
=item B<--max-chars>=I<max-chars>
|
||||||
|
|
||||||
=item B<-s> I<max-chars>
|
=item B<-s> I<max-chars>
|
||||||
|
@ -1302,7 +1362,7 @@ operating system and the B<-s> option. Pipe the input from /dev/null
|
||||||
to do anything.
|
to do anything.
|
||||||
|
|
||||||
|
|
||||||
=item B<--semaphore> (beta testing)
|
=item B<--semaphore>
|
||||||
|
|
||||||
Work as a counting semaphore. B<--semaphore> will cause GNU
|
Work as a counting semaphore. B<--semaphore> will cause GNU
|
||||||
B<parallel> to start I<command> in the background. When the number of
|
B<parallel> to start I<command> in the background. When the number of
|
||||||
|
@ -1339,7 +1399,7 @@ Implies B<--semaphore>.
|
||||||
See also B<man sem>.
|
See also B<man sem>.
|
||||||
|
|
||||||
|
|
||||||
=item B<--semaphoretimeout> I<secs> (beta testing)
|
=item B<--semaphoretimeout> I<secs>
|
||||||
|
|
||||||
If the semaphore is not released within secs seconds, take it anyway.
|
If the semaphore is not released within secs seconds, take it anyway.
|
||||||
|
|
||||||
|
@ -1508,7 +1568,7 @@ The sshloginfile '-' is special, too, it read sshlogins from stdin
|
||||||
(standard input).
|
(standard input).
|
||||||
|
|
||||||
|
|
||||||
=item B<--slotreplace> I<replace-str> (beta testing)
|
=item B<--slotreplace> I<replace-str>
|
||||||
|
|
||||||
Use the replacement string I<replace-str> instead of B<{%}> for
|
Use the replacement string I<replace-str> instead of B<{%}> for
|
||||||
job slot number.
|
job slot number.
|
||||||
|
@ -1998,6 +2058,15 @@ B<$(date -d "today -{1} days" +%Y%m%d)> will give the dates in
|
||||||
YYYYMMDD with {1} days subtracted.
|
YYYYMMDD with {1} days subtracted.
|
||||||
|
|
||||||
|
|
||||||
|
=head1 EXAMPLE: Digtal clock with "blinking" :
|
||||||
|
|
||||||
|
The : in a digital clock blinks. To make every other line have a ':'
|
||||||
|
and the rest a ' ' a perl expression is used to look at the 3rd input
|
||||||
|
source. If the value modudo 2 is 1: Use ":" otherwise use " ":
|
||||||
|
|
||||||
|
B<parallel -k echo {1}'{=3 $_=$_%2?":":" "=}'{2}{3} ::: {0..12} ::: {0..5} ::: {0..9}>
|
||||||
|
|
||||||
|
|
||||||
=head1 EXAMPLE: Breadth first parallel web crawler/mirrorer
|
=head1 EXAMPLE: Breadth first parallel web crawler/mirrorer
|
||||||
|
|
||||||
This script below will crawl and mirror a URL in parallel. It
|
This script below will crawl and mirror a URL in parallel. It
|
||||||
|
@ -2715,7 +2784,7 @@ B<echo my_command my_arg >>>B< jobqueue>
|
||||||
You can of course use B<-S> to distribute the jobs to remote
|
You can of course use B<-S> to distribute the jobs to remote
|
||||||
computers:
|
computers:
|
||||||
|
|
||||||
B<echo >>B<jobqueue>; B<tail -f jobqueue | parallel -S ..>
|
B<true >>B<jobqueue>; B<tail -f jobqueue | parallel -S ..>
|
||||||
|
|
||||||
There is a a small issue when using GNU B<parallel> as queue
|
There is a a small issue when using GNU B<parallel> as queue
|
||||||
system/batch manager: You have to submit JobSlot number of jobs before
|
system/batch manager: You have to submit JobSlot number of jobs before
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
* EXAMPLE@asis{:} Removing file extension when processing files::
|
* EXAMPLE@asis{:} Removing file extension when processing files::
|
||||||
* EXAMPLE@asis{:} Removing two file extensions when processing files and calling GNU Parallel from itself::
|
* EXAMPLE@asis{:} Removing two file extensions when processing files and calling GNU Parallel from itself::
|
||||||
* EXAMPLE@asis{:} Download 10 images for each of the past 30 days::
|
* EXAMPLE@asis{:} Download 10 images for each of the past 30 days::
|
||||||
|
* EXAMPLE@asis{:} Digtal clock with "blinking" @asis{:}::
|
||||||
* EXAMPLE@asis{:} Breadth first parallel web crawler/mirrorer::
|
* EXAMPLE@asis{:} Breadth first parallel web crawler/mirrorer::
|
||||||
* EXAMPLE@asis{:} Process files from a tar file while unpacking::
|
* EXAMPLE@asis{:} Process files from a tar file while unpacking::
|
||||||
* EXAMPLE@asis{:} Rewriting a for-loop and a while-read-loop::
|
* EXAMPLE@asis{:} Rewriting a for-loop and a while-read-loop::
|
||||||
|
@ -170,8 +171,10 @@ If it is a zsh function you will need to use this helper function
|
||||||
SHELL=/bin/bash parallel "my_func {}" ::: 1 2
|
SHELL=/bin/bash parallel "my_func {}" ::: 1 2
|
||||||
@end verbatim
|
@end verbatim
|
||||||
|
|
||||||
@item @strong{@{@}}
|
The command cannot contain the character \257 (¯).
|
||||||
@anchor{@strong{@{@}}}
|
|
||||||
|
@item @strong{@{@}} (alpha testing)
|
||||||
|
@anchor{@strong{@{@}} (alpha testing)}
|
||||||
|
|
||||||
Input line. This replacement string will be replaced by a full line
|
Input line. This replacement string will be replaced by a full line
|
||||||
read from the input source. The input source is normally stdin
|
read from the input source. The input source is normally stdin
|
||||||
|
@ -183,8 +186,8 @@ The replacement string @strong{@{@}} can be changed with @strong{-I}.
|
||||||
If the command line contains no replacement strings then @strong{@{@}} will be
|
If the command line contains no replacement strings then @strong{@{@}} will be
|
||||||
appended to the command line.
|
appended to the command line.
|
||||||
|
|
||||||
@item @strong{@{.@}}
|
@item @strong{@{.@}} (alpha testing)
|
||||||
@anchor{@strong{@{.@}}}
|
@anchor{@strong{@{.@}} (alpha testing)}
|
||||||
|
|
||||||
Input line without extension. This replacement string will be replaced
|
Input line without extension. This replacement string will be replaced
|
||||||
by the input with the extension removed. If the input line contains
|
by the input with the extension removed. If the input line contains
|
||||||
|
@ -199,8 +202,8 @@ The replacement string @strong{@{.@}} can be changed with @strong{--er}.
|
||||||
|
|
||||||
To understand replacement strings see @strong{@{@}}.
|
To understand replacement strings see @strong{@{@}}.
|
||||||
|
|
||||||
@item @strong{@{/@}}
|
@item @strong{@{/@}} (alpha testing)
|
||||||
@anchor{@strong{@{/@}}}
|
@anchor{@strong{@{/@}} (alpha testing)}
|
||||||
|
|
||||||
Basename of input line. This replacement string will be replaced by
|
Basename of input line. This replacement string will be replaced by
|
||||||
the input with the directory part removed.
|
the input with the directory part removed.
|
||||||
|
@ -210,8 +213,8 @@ The replacement string @strong{@{/@}} can be changed with
|
||||||
|
|
||||||
To understand replacement strings see @strong{@{@}}.
|
To understand replacement strings see @strong{@{@}}.
|
||||||
|
|
||||||
@item @strong{@{//@}}
|
@item @strong{@{//@}} (alpha testing)
|
||||||
@anchor{@strong{@{//@}}}
|
@anchor{@strong{@{//@}} (alpha testing)}
|
||||||
|
|
||||||
Dirname of input line. This replacement string will be replaced by the
|
Dirname of input line. This replacement string will be replaced by the
|
||||||
dir of the input line. See @strong{dirname}(1).
|
dir of the input line. See @strong{dirname}(1).
|
||||||
|
@ -221,8 +224,8 @@ The replacement string @strong{@{//@}} can be changed with
|
||||||
|
|
||||||
To understand replacement strings see @strong{@{@}}.
|
To understand replacement strings see @strong{@{@}}.
|
||||||
|
|
||||||
@item @strong{@{/.@}}
|
@item @strong{@{/.@}} (alpha testing)
|
||||||
@anchor{@strong{@{/.@}}}
|
@anchor{@strong{@{/.@}} (alpha testing)}
|
||||||
|
|
||||||
Basename of input line without extension. This replacement string will
|
Basename of input line without extension. This replacement string will
|
||||||
be replaced by the input with the directory and extension part
|
be replaced by the input with the directory and extension part
|
||||||
|
@ -233,8 +236,8 @@ The replacement string @strong{@{/.@}} can be changed with
|
||||||
|
|
||||||
To understand replacement strings see @strong{@{@}}.
|
To understand replacement strings see @strong{@{@}}.
|
||||||
|
|
||||||
@item @strong{@{#@}}
|
@item @strong{@{#@}} (alpha testing)
|
||||||
@anchor{@strong{@{#@}}}
|
@anchor{@strong{@{#@}} (alpha testing)}
|
||||||
|
|
||||||
Sequence number of the job to run. This replacement string will be
|
Sequence number of the job to run. This replacement string will be
|
||||||
replaced by the sequence number of the job being run. It contains the
|
replaced by the sequence number of the job being run. It contains the
|
||||||
|
@ -319,6 +322,27 @@ directory (if any) and extension removed.
|
||||||
|
|
||||||
To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}.
|
To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}.
|
||||||
|
|
||||||
|
@item @strong{@{=}@emph{perl expression}@strong{=@}}
|
||||||
|
@anchor{@strong{@{=}@emph{perl expression}@strong{=@}}}
|
||||||
|
|
||||||
|
Replace with calculated @emph{perl expression}. @strong{$_} will contain the
|
||||||
|
same as @strong{@{@}}. After evaluating @emph{perl expression} @strong{$_} will be used
|
||||||
|
as the value. It is recommended to only change $_ but you have full
|
||||||
|
access to all of GNU @strong{parallel}'s internal functions and data
|
||||||
|
structures.
|
||||||
|
|
||||||
|
The @strong{@{=}@emph{perl expression}@strong{=@}} must be given as a single string.
|
||||||
|
|
||||||
|
See also: @strong{--rpl} @strong{--parens}
|
||||||
|
|
||||||
|
@item @strong{@{=}@emph{n} @emph{perl expression}@strong{=@}}
|
||||||
|
@anchor{@strong{@{=}@emph{n} @emph{perl expression}@strong{=@}}}
|
||||||
|
|
||||||
|
Positional equivalent to @strong{@{= perl expression =@}}. To understand
|
||||||
|
positional replacement strings see @strong{@{}@emph{n}@strong{@}}.
|
||||||
|
|
||||||
|
See also: @strong{@{= perl expression =@}} @strong{@{}@emph{n}@strong{@}}.
|
||||||
|
|
||||||
@item @strong{:::} @emph{arguments}
|
@item @strong{:::} @emph{arguments}
|
||||||
@anchor{@strong{:::} @emph{arguments}}
|
@anchor{@strong{:::} @emph{arguments}}
|
||||||
|
|
||||||
|
@ -918,8 +942,8 @@ standard specifies @strong{-L} instead.
|
||||||
|
|
||||||
Implies @strong{-X} unless @strong{-m}, @strong{--xargs}, or @strong{--pipe} is set.
|
Implies @strong{-X} unless @strong{-m}, @strong{--xargs}, or @strong{--pipe} is set.
|
||||||
|
|
||||||
@item @strong{--line-buffer} (beta testing)
|
@item @strong{--line-buffer}
|
||||||
@anchor{@strong{--line-buffer} (beta testing)}
|
@anchor{@strong{--line-buffer}}
|
||||||
|
|
||||||
Buffer output on line basis. @strong{--group} will keep the output together
|
Buffer output on line basis. @strong{--group} will keep the output together
|
||||||
for a whole job. @strong{--ungroup} allows output to mixup with half a line
|
for a whole job. @strong{--ungroup} allows output to mixup with half a line
|
||||||
|
@ -1057,8 +1081,8 @@ defaults to '\n'. To have no record separator use @strong{--recend ""}.
|
||||||
|
|
||||||
See also: @strong{--recstart}, @strong{--recend}, @strong{--fifo}, @strong{--cat}, @strong{--pipepart}.
|
See also: @strong{--recstart}, @strong{--recend}, @strong{--fifo}, @strong{--cat}, @strong{--pipepart}.
|
||||||
|
|
||||||
@item @strong{--pipepart} (alpha testing)
|
@item @strong{--pipepart} (beta testing)
|
||||||
@anchor{@strong{--pipepart} (alpha testing)}
|
@anchor{@strong{--pipepart} (beta testing)}
|
||||||
|
|
||||||
Pipe parts of a physical file. @strong{--pipepart} works similar to
|
Pipe parts of a physical file. @strong{--pipepart} works similar to
|
||||||
@strong{--pipe}, but is much faster. It has a few limitations:
|
@strong{--pipe}, but is much faster. It has a few limitations:
|
||||||
|
@ -1184,6 +1208,23 @@ Prompt the user about whether to run each command line and read a line
|
||||||
from the terminal. Only run the command line if the response starts
|
from the terminal. Only run the command line if the response starts
|
||||||
with 'y' or 'Y'. Implies @strong{-t}.
|
with 'y' or 'Y'. Implies @strong{-t}.
|
||||||
|
|
||||||
|
@item @strong{--parens} @emph{parensstring} (alpha testing)
|
||||||
|
@anchor{@strong{--parens} @emph{parensstring} (alpha testing)}
|
||||||
|
|
||||||
|
Use to define start and end parenthesis for @strong{@{= perl expression =@}}. The
|
||||||
|
left and the right parenthesis can be multiple characters and are
|
||||||
|
assumed to be the same length. The default is @strong{@{==@}} giving
|
||||||
|
@strong{@{=} as the start parenthesis and @strong{=@}} as the end parenthesis.
|
||||||
|
|
||||||
|
Another useful setting is @strong{,,,,} which would make both parenthesis
|
||||||
|
@strong{,,}:
|
||||||
|
|
||||||
|
@verbatim
|
||||||
|
parallel --parens ,,,, echo foo is ,,s/I/O/g,, ::: FII
|
||||||
|
@end verbatim
|
||||||
|
|
||||||
|
See also: @strong{--rpl} @strong{@{= perl expression =@}}
|
||||||
|
|
||||||
@item @strong{--profile} @emph{profilename}
|
@item @strong{--profile} @emph{profilename}
|
||||||
@anchor{@strong{--profile} @emph{profilename}}
|
@anchor{@strong{--profile} @emph{profilename}}
|
||||||
|
|
||||||
|
@ -1429,6 +1470,31 @@ time to initialize.
|
||||||
@strong{--keep-order} will not work with @strong{--round-robin} as it is
|
@strong{--keep-order} will not work with @strong{--round-robin} as it is
|
||||||
impossible to track which input block corresponds to which output.
|
impossible to track which input block corresponds to which output.
|
||||||
|
|
||||||
|
@item @strong{--rpl} '@emph{tag} @emph{perl expression}' (alpha testing)
|
||||||
|
@anchor{@strong{--rpl} '@emph{tag} @emph{perl expression}' (alpha testing)}
|
||||||
|
|
||||||
|
Use @emph{tag} as a replacement string for @emph{perl expression}. This makes
|
||||||
|
it possible to define your own replacement strings. GNU @strong{parallel}'s
|
||||||
|
7 replacement strings are implemented as:
|
||||||
|
|
||||||
|
@verbatim
|
||||||
|
--rpl '{} '
|
||||||
|
--rpl '{#} $_=$job->seq()'
|
||||||
|
--rpl '{%} $_=$job->slot()'
|
||||||
|
--rpl '{/} s:.*/::'
|
||||||
|
--rpl '{//} $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);'
|
||||||
|
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
|
||||||
|
--rpl '{.} s:\.[^/.]+$::'
|
||||||
|
@end verbatim
|
||||||
|
|
||||||
|
If the user defined replacement string starts with '@{' it can also be
|
||||||
|
used as a positional replacement string (like @strong{@{2.@}}).
|
||||||
|
|
||||||
|
It is recommended to only change $_ but you have full access to all
|
||||||
|
of GNU @strong{parallel}'s internal functions and data structures.
|
||||||
|
|
||||||
|
See also: @strong{@{= perl expression =@}} @strong{--parens}
|
||||||
|
|
||||||
@item @strong{--max-chars}=@emph{max-chars}
|
@item @strong{--max-chars}=@emph{max-chars}
|
||||||
@anchor{@strong{--max-chars}=@emph{max-chars}}
|
@anchor{@strong{--max-chars}=@emph{max-chars}}
|
||||||
|
|
||||||
|
@ -1451,8 +1517,8 @@ operating system and the @strong{-s} option. Pipe the input from /dev/null
|
||||||
(and perhaps specify --no-run-if-empty) if you don't want GNU @strong{parallel}
|
(and perhaps specify --no-run-if-empty) if you don't want GNU @strong{parallel}
|
||||||
to do anything.
|
to do anything.
|
||||||
|
|
||||||
@item @strong{--semaphore} (beta testing)
|
@item @strong{--semaphore}
|
||||||
@anchor{@strong{--semaphore} (beta testing)}
|
@anchor{@strong{--semaphore}}
|
||||||
|
|
||||||
Work as a counting semaphore. @strong{--semaphore} will cause GNU
|
Work as a counting semaphore. @strong{--semaphore} will cause GNU
|
||||||
@strong{parallel} to start @emph{command} in the background. When the number of
|
@strong{parallel} to start @emph{command} in the background. When the number of
|
||||||
|
@ -1489,8 +1555,8 @@ Implies @strong{--semaphore}.
|
||||||
|
|
||||||
See also @strong{man sem}.
|
See also @strong{man sem}.
|
||||||
|
|
||||||
@item @strong{--semaphoretimeout} @emph{secs} (beta testing)
|
@item @strong{--semaphoretimeout} @emph{secs}
|
||||||
@anchor{@strong{--semaphoretimeout} @emph{secs} (beta testing)}
|
@anchor{@strong{--semaphoretimeout} @emph{secs}}
|
||||||
|
|
||||||
If the semaphore is not released within secs seconds, take it anyway.
|
If the semaphore is not released within secs seconds, take it anyway.
|
||||||
|
|
||||||
|
@ -1681,8 +1747,8 @@ The sshloginfile '.' is special, it read sshlogins from
|
||||||
The sshloginfile '-' is special, too, it read sshlogins from stdin
|
The sshloginfile '-' is special, too, it read sshlogins from stdin
|
||||||
(standard input).
|
(standard input).
|
||||||
|
|
||||||
@item @strong{--slotreplace} @emph{replace-str} (beta testing)
|
@item @strong{--slotreplace} @emph{replace-str}
|
||||||
@anchor{@strong{--slotreplace} @emph{replace-str} (beta testing)}
|
@anchor{@strong{--slotreplace} @emph{replace-str}}
|
||||||
|
|
||||||
Use the replacement string @emph{replace-str} instead of @strong{@{%@}} for
|
Use the replacement string @emph{replace-str} instead of @strong{@{%@}} for
|
||||||
job slot number.
|
job slot number.
|
||||||
|
@ -2193,6 +2259,15 @@ download images for the past 30 days:
|
||||||
@strong{$(date -d "today -@{1@} days" +%Y%m%d)} will give the dates in
|
@strong{$(date -d "today -@{1@} days" +%Y%m%d)} will give the dates in
|
||||||
YYYYMMDD with @{1@} days subtracted.
|
YYYYMMDD with @{1@} days subtracted.
|
||||||
|
|
||||||
|
@node EXAMPLE: Digtal clock with "blinking" :
|
||||||
|
@chapter EXAMPLE: Digtal clock with "blinking" :
|
||||||
|
|
||||||
|
The : in a digital clock blinks. To make every other line have a ':'
|
||||||
|
and the rest a ' ' a perl expression is used to look at the 3rd input
|
||||||
|
source. If the value modudo 2 is 1: Use ":" otherwise use " ":
|
||||||
|
|
||||||
|
@strong{parallel -k echo @{1@}'@{=3 $_=$_%2?":":" "=@}'@{2@}@{3@} ::: @{0..12@} ::: @{0..5@} ::: @{0..9@}}
|
||||||
|
|
||||||
@node EXAMPLE: Breadth first parallel web crawler/mirrorer
|
@node EXAMPLE: Breadth first parallel web crawler/mirrorer
|
||||||
@chapter EXAMPLE: Breadth first parallel web crawler/mirrorer
|
@chapter EXAMPLE: Breadth first parallel web crawler/mirrorer
|
||||||
|
|
||||||
|
@ -2997,7 +3072,7 @@ To submit your jobs to the queue:
|
||||||
You can of course use @strong{-S} to distribute the jobs to remote
|
You can of course use @strong{-S} to distribute the jobs to remote
|
||||||
computers:
|
computers:
|
||||||
|
|
||||||
@strong{echo }>@strong{jobqueue}; @strong{tail -f jobqueue | parallel -S ..}
|
@strong{true }>@strong{jobqueue}; @strong{tail -f jobqueue | parallel -S ..}
|
||||||
|
|
||||||
There is a a small issue when using GNU @strong{parallel} as queue
|
There is a a small issue when using GNU @strong{parallel} as queue
|
||||||
system/batch manager: You have to submit JobSlot number of jobs before
|
system/batch manager: You have to submit JobSlot number of jobs before
|
||||||
|
|
2
src/sql
2
src/sql
|
@ -566,7 +566,7 @@ $Global::Initfile && unlink $Global::Initfile;
|
||||||
exit ($err);
|
exit ($err);
|
||||||
|
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
$Global::version = 20140622;
|
$Global::version = 20140711;
|
||||||
$Global::progname = 'sql';
|
$Global::progname = 'sql';
|
||||||
|
|
||||||
# This must be done first as this may exec myself
|
# This must be done first as this may exec myself
|
||||||
|
|
BIN
src/sql.pdf
BIN
src/sql.pdf
Binary file not shown.
|
@ -3,11 +3,13 @@ testsuite: 3
|
||||||
|
|
||||||
3: ../src/parallel tests-to-run/* wanted-results/* startdb prereqlocal prereqremote
|
3: ../src/parallel tests-to-run/* wanted-results/* startdb prereqlocal prereqremote
|
||||||
TRIES=3 time sh Start.sh || true
|
TRIES=3 time sh Start.sh || true
|
||||||
|
touch ~/.parallel/will-cite
|
||||||
date
|
date
|
||||||
make stopvm
|
make stopvm
|
||||||
|
|
||||||
1: ../src/parallel tests-to-run/* wanted-results/* prereqlocal startdb prereqremote
|
1: ../src/parallel tests-to-run/* wanted-results/* prereqlocal startdb prereqremote
|
||||||
time sh Start.sh || true
|
time sh Start.sh || true
|
||||||
|
touch ~/.parallel/will-cite
|
||||||
date
|
date
|
||||||
make stopvm
|
make stopvm
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ prereqlocal: installparallel
|
||||||
which timeout || (echo timeout is required for testsuite; /bin/false)
|
which timeout || (echo timeout is required for testsuite; /bin/false)
|
||||||
|
|
||||||
prereqremote: installparallel startvm
|
prereqremote: installparallel startvm
|
||||||
parallel ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)
|
parallel --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)
|
||||||
|
|
||||||
startvm:
|
startvm:
|
||||||
# Make sure we can reach the virtual machines
|
# Make sure we can reach the virtual machines
|
||||||
|
|
|
@ -4,12 +4,15 @@ rm -rf tmp
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -j6 -k -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -j5 -k -L1
|
||||||
echo '### bug #41964: --controlmaster not seems to reuse OpenSSH connections to the same host'
|
echo '### bug #41964: --controlmaster not seems to reuse OpenSSH connections to the same host'
|
||||||
(parallel -S redhat9.tange.dk true ::: {1..20}; echo No --controlmaster - finish last) &
|
(parallel -S redhat9.tange.dk true ::: {1..20}; echo No --controlmaster - finish last) &
|
||||||
(parallel -M -S redhat9.tange.dk true ::: {1..20}; echo With --controlmaster - finish first) &
|
(parallel -M -S redhat9.tange.dk true ::: {1..20}; echo With --controlmaster - finish first) &
|
||||||
wait
|
wait
|
||||||
|
|
||||||
|
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
||||||
|
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
||||||
|
|
||||||
echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores'
|
echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores'
|
||||||
echo '** test_zsh'
|
echo '** test_zsh'
|
||||||
FOO=test_zsh parallel --env FOO,PATH -S zsh@lo env ::: "" |sort|egrep 'FOO|PATH'
|
FOO=test_zsh parallel --env FOO,PATH -S zsh@lo env ::: "" |sort|egrep 'FOO|PATH'
|
||||||
|
|
|
@ -143,7 +143,7 @@ echo '### Test {#}'
|
||||||
seq 1 10 | parallel -k echo {#}
|
seq 1 10 | parallel -k echo {#}
|
||||||
|
|
||||||
echo '### Test --seqreplace and line too long'
|
echo '### Test --seqreplace and line too long'
|
||||||
seq 1 100 | stdout parallel -k --seqreplace I echo $(perl -e 'print "I"x130000') \|wc | uniq
|
seq 1 1000 | stdout parallel -j1 -s 210 -k --seqreplace I echo IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII \|wc | uniq -c
|
||||||
|
|
||||||
echo '### bug #37042: -J foo is taken from the whole command line - not just the part before the command'
|
echo '### bug #37042: -J foo is taken from the whole command line - not just the part before the command'
|
||||||
echo '--tagstring foo' > ~/.parallel/bug_37042_profile;
|
echo '--tagstring foo' > ~/.parallel/bug_37042_profile;
|
||||||
|
|
|
@ -18,3 +18,5 @@ EOF
|
||||||
chmod 755 /tmp/parallel-script-for-script2
|
chmod 755 /tmp/parallel-script-for-script2
|
||||||
echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script2 /dev/null
|
echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script2 /dev/null
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
touch ~/.parallel/will-cite
|
||||||
|
|
|
@ -10,7 +10,7 @@ echo '3 x terminated is OK' >&2
|
||||||
echo '### Test $TMPDIR'
|
echo '### Test $TMPDIR'
|
||||||
TMPDIR=$SHM stdout timeout -k 1 6 parallel pv -qL10m {} ::: /dev/zero >/dev/null &
|
TMPDIR=$SHM stdout timeout -k 1 6 parallel pv -qL10m {} ::: /dev/zero >/dev/null &
|
||||||
PID=$!
|
PID=$!
|
||||||
seq 1 200 | parallel -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
seq 1 200 | parallel -N0 -I // -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
||||||
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>;
|
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>;
|
||||||
if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n";exit }'
|
if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n";exit }'
|
||||||
kill $PID
|
kill $PID
|
||||||
|
@ -20,7 +20,7 @@ sleep 0.1
|
||||||
echo '### Test --tmpdir'
|
echo '### Test --tmpdir'
|
||||||
stdout timeout -k 1 6 parallel --tmpdir $SHM pv -qL10m {} ::: /dev/zero >/dev/null &
|
stdout timeout -k 1 6 parallel --tmpdir $SHM pv -qL10m {} ::: /dev/zero >/dev/null &
|
||||||
PID=$!
|
PID=$!
|
||||||
seq 1 200 | parallel -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
seq 1 200 | parallel -N0 -I // -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
||||||
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>; if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n"; exit }'
|
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>; if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n"; exit }'
|
||||||
kill $PID
|
kill $PID
|
||||||
wait
|
wait
|
||||||
|
@ -29,7 +29,7 @@ sleep 0.1
|
||||||
echo '### Test $TMPDIR and --tmpdir'
|
echo '### Test $TMPDIR and --tmpdir'
|
||||||
TMPDIR=/tmp stdout timeout -k 1 6 parallel --tmpdir $SHM pv -qL10m {} ::: /dev/zero >/dev/null &
|
TMPDIR=/tmp stdout timeout -k 1 6 parallel --tmpdir $SHM pv -qL10m {} ::: /dev/zero >/dev/null &
|
||||||
PID=$!
|
PID=$!
|
||||||
seq 1 200 | parallel -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
seq 1 200 | parallel -N0 -I // -j1 "df $SHM | parallel -k --colsep ' +' echo {4}|tail -n 1;sleep 0.1" \
|
||||||
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>; if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n"; exit }'
|
| stdout timeout -k 1 10 perl -ne 'BEGIN{$a=<>} $b=<>; if ($a-1000 > $b) { print "More than 1 MB gone. Good!\n"; exit }'
|
||||||
kill $PID
|
kill $PID
|
||||||
wait
|
wait
|
||||||
|
|
|
@ -4,7 +4,7 @@ rsync -Ha --delete input-files/segfault/ tmp/
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
||||||
# -L1 will join lines ending in ' '
|
# -L1 will join lines ending in ' '
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j+0 -k -L1
|
||||||
echo '### bug #41565: Print happens in blocks - not after each job complete'
|
echo '### bug #41565: Print happens in blocks - not after each job complete'
|
||||||
echo 'The timing here is important: 2 3 4 5 6'
|
echo 'The timing here is important: 2 3 4 5 6'
|
||||||
ping -c 7 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.2)."\n"'
|
ping -c 7 lo | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.2)."\n"'
|
||||||
|
|
|
@ -44,8 +44,8 @@ echo '### nice and tcsh and Bug #33995: Jobs executed with sh instead of $SHELL'
|
||||||
seq 1 2 | SHELL=tcsh MANPATH=. stdout parallel -k --nice 8 setenv a b\;echo \$SHELL
|
seq 1 2 | SHELL=tcsh MANPATH=. stdout parallel -k --nice 8 setenv a b\;echo \$SHELL
|
||||||
|
|
||||||
echo '### bug #42041: Implement $PARALLEL_JOBSLOT'
|
echo '### bug #42041: Implement $PARALLEL_JOBSLOT'
|
||||||
parallel -k --slotreplace ,, -j2 echo ,, ::: {1..4}
|
parallel -k --slotreplace // -j2 sleep 1\;echo // ::: {1..4}
|
||||||
parallel -k -j2 echo {%} ::: {1..4}
|
parallel -k -j2 sleep 1\;echo {%} ::: {1..4}
|
||||||
|
|
||||||
echo '### bug #42363: --pipepart and --fifo/--cat does not work'
|
echo '### bug #42363: --pipepart and --fifo/--cat does not work'
|
||||||
seq 100 > /tmp/bug42363;
|
seq 100 > /tmp/bug42363;
|
||||||
|
|
|
@ -30,4 +30,15 @@ echo '### How do we deal with missing $HOME'
|
||||||
|
|
||||||
echo '### How do we deal with missing $SHELL'
|
echo '### How do we deal with missing $SHELL'
|
||||||
unset SHELL; stdout perl -w $(which parallel) -k echo ::: 1 2 3
|
unset SHELL; stdout perl -w $(which parallel) -k echo ::: 1 2 3
|
||||||
|
|
||||||
|
echo '### Test if length is computed correctly - first should give one line, second 2 lines each'
|
||||||
|
seq 4 | parallel -s 29 -X -kj1 echo a{}b{}c
|
||||||
|
seq 4 | parallel -s 28 -X -kj1 echo a{}b{}c
|
||||||
|
seq 4 | parallel -s 21 -X -kj1 echo {} {}
|
||||||
|
seq 4 | parallel -s 20 -X -kj1 echo {} {}
|
||||||
|
seq 4 | parallel -s 23 -m -kj1 echo a{}b{}c
|
||||||
|
seq 4 | parallel -s 22 -m -kj1 echo a{}b{}c
|
||||||
|
seq 4 | parallel -s 21 -m -kj1 echo {} {}
|
||||||
|
seq 4 | parallel -s 20 -m -kj1 echo {} {}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -34,6 +34,11 @@ expect "opt--interactive 3"
|
||||||
_EOF
|
_EOF
|
||||||
echo
|
echo
|
||||||
cat <<'EOF' | parallel -j0 -k -L1
|
cat <<'EOF' | parallel -j0 -k -L1
|
||||||
|
echo '### Test killing children with --timeout and exit value (failed if timed out)'
|
||||||
|
pstree | grep sleep | grep -v anacron | grep -v screensave | wc;
|
||||||
|
parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ;
|
||||||
|
echo $?; sleep 7; pstree | grep sleep | grep -v anacron | grep -v screensave | wc
|
||||||
|
|
||||||
echo '### Test -L -l and --max-lines'
|
echo '### Test -L -l and --max-lines'
|
||||||
(echo a_b;echo c) | parallel -km -L2 echo
|
(echo a_b;echo c) | parallel -km -L2 echo
|
||||||
(echo a_b;echo c) | parallel -k -L2 echo
|
(echo a_b;echo c) | parallel -k -L2 echo
|
||||||
|
@ -90,10 +95,6 @@ echo '### Test -a and --arg-file: Read input from file instead of stdin'
|
||||||
seq 1 10 >/tmp/$$-1; parallel -k -a /tmp/$$-1 echo
|
seq 1 10 >/tmp/$$-1; parallel -k -a /tmp/$$-1 echo
|
||||||
seq 1 10 >/tmp/$$-2; parallel -k --arg-file /tmp/$$-2 echo
|
seq 1 10 >/tmp/$$-2; parallel -k --arg-file /tmp/$$-2 echo
|
||||||
|
|
||||||
echo '### Test killing children with --timeout and exit value (failed if timed out)'
|
|
||||||
pstree | grep sleep | grep -v anacron | grep -v screensave | wc;
|
|
||||||
parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ;
|
|
||||||
echo $?; pstree | grep sleep | grep -v anacron | grep -v screensave | wc
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
#echo '### Test bugfix if no command given'
|
#echo '### Test bugfix if no command given'
|
||||||
|
@ -264,3 +265,5 @@ seq 19 | parallel -k -N 10 echo a{}b
|
||||||
echo '### Test -L context replace'
|
echo '### Test -L context replace'
|
||||||
seq 19 | parallel -k -L 10 echo a{}b
|
seq 19 | parallel -k -L 10 echo a{}b
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
touch ~/.parallel/will-cite
|
||||||
|
|
|
@ -8,13 +8,13 @@ SSHLOGIN2=parallel@$SERVER2
|
||||||
# -L1 will join lines ending in ' '
|
# -L1 will join lines ending in ' '
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/\;s/\$SSHLOGIN1/$SSHLOGIN1/\;s/\$SSHLOGIN2/$SSHLOGIN2/ | parallel -j0 -k -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/\;s/\$SSHLOGIN1/$SSHLOGIN1/\;s/\$SSHLOGIN2/$SSHLOGIN2/ | parallel -j0 -k -L1
|
||||||
echo '### Test --onall';
|
echo '### Test --onall';
|
||||||
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
|
||||||
|
|
||||||
echo '### Test | --onall';
|
echo '### Test | --onall';
|
||||||
seq 3 | parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
seq 3 | parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: -
|
||||||
|
|
||||||
echo '### Test --onall -u';
|
echo '### Test --onall -u';
|
||||||
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 -u '(echo {3} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
|
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 -u '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
|
||||||
|
|
||||||
echo '### Test --nonall';
|
echo '### Test --nonall';
|
||||||
parallel --nonall -k -S $SSHLOGIN1,$SSHLOGIN2 'hostname' | sort
|
parallel --nonall -k -S $SSHLOGIN1,$SSHLOGIN2 'hostname' | sort
|
||||||
|
|
|
@ -4,4 +4,3 @@
|
||||||
### Test -p
|
### Test -p
|
||||||
...OK
|
...OK
|
||||||
### Test --sensor -l negative
|
### Test --sensor -l negative
|
||||||
more than 6 GB used
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
### bug #41964: --controlmaster not seems to reuse OpenSSH connections to the same host
|
### bug #41964: --controlmaster not seems to reuse OpenSSH connections to the same host
|
||||||
With --controlmaster - finish first
|
With --controlmaster - finish first
|
||||||
No --controlmaster - finish last
|
No --controlmaster - finish last
|
||||||
|
### Stop if all hosts are filtered and there are no hosts left to run on
|
||||||
|
parallel: Warning: Removed no-such.host
|
||||||
|
parallel: Error: There are no hosts left to run on.
|
||||||
### bug #41805: Idea: propagate --env for parallel --number-of-cores
|
### bug #41805: Idea: propagate --env for parallel --number-of-cores
|
||||||
** test_zsh
|
** test_zsh
|
||||||
FOO=test_zsh
|
FOO=test_zsh
|
||||||
|
|
|
@ -83,14 +83,14 @@ foo ole
|
||||||
foo ole
|
foo ole
|
||||||
### Test of --colsep
|
### Test of --colsep
|
||||||
a b c
|
a b c
|
||||||
a b c {4}
|
a b c
|
||||||
a b c d
|
a b c d
|
||||||
a b c
|
a b c
|
||||||
d e f
|
d e f
|
||||||
a b c
|
a b c
|
||||||
d e f
|
d e f
|
||||||
a b c
|
a b c
|
||||||
a b c {4}
|
a b c
|
||||||
a b c d
|
a b c d
|
||||||
### Test of tab as colsep
|
### Test of tab as colsep
|
||||||
abc def
|
abc def
|
||||||
|
@ -106,25 +106,25 @@ jkl mno pqr
|
||||||
### Test of quoting after colsplit
|
### Test of quoting after colsplit
|
||||||
>/tmp/null >/dev/null
|
>/tmp/null >/dev/null
|
||||||
### Test of --colsep as regexp
|
### Test of --colsep as regexp
|
||||||
a b c {4}
|
a b c
|
||||||
a b c d
|
a b c d
|
||||||
a b c {4}
|
a b c
|
||||||
a b c d
|
a b c d
|
||||||
a b c {4}
|
a b c
|
||||||
a b c d
|
a b c d
|
||||||
a_b_c_{4}
|
a_b_c_
|
||||||
a_b_c_d
|
a_b_c_d
|
||||||
### Test of -C
|
### Test of -C
|
||||||
a_b_c_{4}
|
a_b_c_
|
||||||
a_b_c_d
|
a_b_c_d
|
||||||
### Test of --trim n
|
### Test of --trim n
|
||||||
a_b_\ c\ _{4}
|
a_b_\ c\ _
|
||||||
a_\ b\ _c_d
|
a_\ b\ _c_d
|
||||||
a_b_c_{4}
|
a_b_c_
|
||||||
a_b_c_d
|
a_b_c_d
|
||||||
### Test of bug: If input is empty string
|
### Test of bug: If input is empty string
|
||||||
echo {2}
|
echo
|
||||||
{2}
|
|
||||||
echo ac
|
echo ac
|
||||||
ac
|
ac
|
||||||
echo ac
|
echo ac
|
||||||
|
@ -257,8 +257,9 @@ o
|
||||||
9
|
9
|
||||||
10
|
10
|
||||||
### Test --seqreplace and line too long
|
### Test --seqreplace and line too long
|
||||||
1 1 130001
|
9 1 1 101
|
||||||
parallel: Error: Command line too long (260009 >= 131071) at number 9: 10...
|
90 1 1 201
|
||||||
|
1 parallel: Error: Command line too long (309 >= 210) at number 0: 100...
|
||||||
### bug #37042: -J foo is taken from the whole command line - not just the part before the command
|
### bug #37042: -J foo is taken from the whole command line - not just the part before the command
|
||||||
foo tag_with_foo
|
foo tag_with_foo
|
||||||
a tag_with_a
|
a tag_with_a
|
||||||
|
|
|
@ -71,7 +71,7 @@ y
|
||||||
### -i -s26 -0 echo from \{\} to x{}y < items-0.xi
|
### -i -s26 -0 echo from \{\} to x{}y < items-0.xi
|
||||||
xargs: argument list too long
|
xargs: argument list too long
|
||||||
from one to xoney
|
from one to xoney
|
||||||
parallel: Error: Command line too long (42 >= 26) at number 2:
|
parallel: Error: Command line too long (42 >= 26) at number 0:
|
||||||
...
|
...
|
||||||
### -l -0 echo < ldata-0.xi
|
### -l -0 echo < ldata-0.xi
|
||||||
1 22 333 4444
|
1 22 333 4444
|
||||||
|
@ -829,7 +829,7 @@ with 'single quotes' as well.
|
||||||
/src/gnu/autoconf-1.11/texinfo.tex
|
/src/gnu/autoconf-1.11/texinfo.tex
|
||||||
### -s6 echo < files.xi
|
### -s6 echo < files.xi
|
||||||
xargs: argument line too long
|
xargs: argument line too long
|
||||||
parallel: Error: Command line too long (27 >= 6) at number 7: /src/gnu/autoconf-1.11...
|
parallel: Error: Command line too long (27 >= 6) at number -7: /src/gnu/autoconf-1.11...
|
||||||
### -iARG -s86 echo ARG is xARGx < files.xi
|
### -iARG -s86 echo ARG is xARGx < files.xi
|
||||||
/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x
|
/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x
|
||||||
/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx
|
/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx
|
||||||
|
@ -995,7 +995,7 @@ from: can't read /var/mail/{}
|
||||||
### -i -s26 echo from \{\} to x{}y < items.xi
|
### -i -s26 echo from \{\} to x{}y < items.xi
|
||||||
xargs: argument list too long
|
xargs: argument list too long
|
||||||
from dumb to xdumby
|
from dumb to xdumby
|
||||||
parallel: Error: Command line too long (36 >= 26) at number 1:
...
|
parallel: Error: Command line too long (36 >= 26) at number 0:
...
|
||||||
### -i__ echo FIRST __ IS OK < quotes.xi
|
### -i__ echo FIRST __ IS OK < quotes.xi
|
||||||
FIRST this is IS OK
|
FIRST this is IS OK
|
||||||
FIRST quoted stuff IS OK
|
FIRST quoted stuff IS OK
|
||||||
|
|
|
@ -45,9 +45,9 @@ bug #37694: Empty string argument skipped when using --quote
|
||||||
11 1
|
11 1
|
||||||
12 2
|
12 2
|
||||||
11 3
|
11 3
|
||||||
a_b_c_{4}
|
a_b_c_
|
||||||
a_b_c_d
|
a_b_c_d
|
||||||
{4}
|
|
||||||
### test08
|
### test08
|
||||||
b
|
b
|
||||||
d
|
d
|
||||||
|
|
|
@ -112,3 +112,25 @@ parallel: Warning: $SHELL not set. Using /bin/sh.
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
|
echo '### Test if length is computed correctly - first should give one line, second 2 lines each'
|
||||||
|
### Test if length is computed correctly - first should give one line, second 2 lines each
|
||||||
|
seq 4 | parallel -s 29 -X -kj1 echo a{}b{}c
|
||||||
|
a1b1c a2b2c a3b3c a4b4c
|
||||||
|
seq 4 | parallel -s 28 -X -kj1 echo a{}b{}c
|
||||||
|
a1b1c a2b2c a3b3c
|
||||||
|
a4b4c
|
||||||
|
seq 4 | parallel -s 21 -X -kj1 echo {} {}
|
||||||
|
1 2 3 4 1 2 3 4
|
||||||
|
seq 4 | parallel -s 20 -X -kj1 echo {} {}
|
||||||
|
1 2 3 1 2 3
|
||||||
|
4 4
|
||||||
|
seq 4 | parallel -s 23 -m -kj1 echo a{}b{}c
|
||||||
|
a1 2 3 4b1 2 3 4c
|
||||||
|
seq 4 | parallel -s 22 -m -kj1 echo a{}b{}c
|
||||||
|
a1 2 3b1 2 3c
|
||||||
|
a4b4c
|
||||||
|
seq 4 | parallel -s 21 -m -kj1 echo {} {}
|
||||||
|
1 2 3 4 1 2 3 4
|
||||||
|
seq 4 | parallel -s 20 -m -kj1 echo {} {}
|
||||||
|
1 2 3 1 2 3
|
||||||
|
4 4
|
||||||
|
|
|
@ -330,7 +330,7 @@ echo 999999999
|
||||||
### Test eof string after :::
|
### Test eof string after :::
|
||||||
foo
|
foo
|
||||||
### Test -C and --trim rl
|
### Test -C and --trim rl
|
||||||
a_b_c_{4}
|
a_b_c_
|
||||||
a_b_c_d
|
a_b_c_d
|
||||||
### Test empty input
|
### Test empty input
|
||||||
### Test -m
|
### Test -m
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
Setup on polarhome machines
|
Setup on polarhome machines
|
||||||
copy_and_test minix.polarhome.com
|
copy_and_test minix.polarhome.com
|
||||||
minix.polarhome.com ### Run the test on minix.polarhome.com
|
minix.polarhome.com ### Run the test on minix.polarhome.com
|
||||||
minix.polarhome.com Works on minix.polarhome.com
|
|
||||||
copy_and_test freebsd.polarhome.com
|
copy_and_test freebsd.polarhome.com
|
||||||
freebsd.polarhome.com ### Run the test on freebsd.polarhome.com
|
freebsd.polarhome.com ### Run the test on freebsd.polarhome.com
|
||||||
freebsd.polarhome.com Works on freebsd.polarhome.com
|
freebsd.polarhome.com Works on freebsd.polarhome.com
|
||||||
|
|
|
@ -29,6 +29,10 @@ sleep 0.1; echo opt--interactive 3 ?...y
|
||||||
opt--interactive 1
|
opt--interactive 1
|
||||||
opt--interactive 3
|
opt--interactive 3
|
||||||
|
|
||||||
|
### Test killing children with --timeout and exit value (failed if timed out)
|
||||||
|
0 0 0
|
||||||
|
2
|
||||||
|
0 0 0
|
||||||
### Test -L -l and --max-lines
|
### Test -L -l and --max-lines
|
||||||
a_b
|
a_b
|
||||||
c
|
c
|
||||||
|
@ -101,14 +105,14 @@ a_b c
|
||||||
d
|
d
|
||||||
e
|
e
|
||||||
### test too long args
|
### test too long args
|
||||||
parallel: Error: Command line too long (1000005 >= 131071) at number 1: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
parallel: Error: Command line too long (1000005 >= 131071) at number 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||||
xargs: argument line too long
|
xargs: argument line too long
|
||||||
1 2
|
1 2
|
||||||
3 4
|
3 4
|
||||||
5 6
|
5 6
|
||||||
7 8
|
7 8
|
||||||
9 10
|
9 10
|
||||||
parallel: Error: Command line too long (1000007 >= 10) at number 5: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
parallel: Error: Command line too long (1000007 >= 10) at number 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||||
1 2
|
1 2
|
||||||
3 4
|
3 4
|
||||||
5 6
|
5 6
|
||||||
|
@ -120,20 +124,20 @@ xargs: argument line too long
|
||||||
5 6
|
5 6
|
||||||
7 8
|
7 8
|
||||||
9 10
|
9 10
|
||||||
parallel: Error: Command line too long (1000007 >= 10) at number 5: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
parallel: Error: Command line too long (1000007 >= 10) at number 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
||||||
### Test -x
|
### Test -x
|
||||||
1 2
|
1 2
|
||||||
3 4
|
3 4
|
||||||
5 6
|
5 6
|
||||||
7 8
|
7 8
|
||||||
9 10
|
9 10
|
||||||
parallel: Error: Command line too long (10 >= 10) at number 5: 12345...
|
parallel: Error: Command line too long (10 >= 10) at number 0: 12345...
|
||||||
1 2
|
1 2
|
||||||
3 4
|
3 4
|
||||||
5 6
|
5 6
|
||||||
7 8
|
7 8
|
||||||
9 10
|
9 10
|
||||||
parallel: Error: Command line too long (10 >= 10) at number 5: 12345...
|
parallel: Error: Command line too long (10 >= 10) at number 0: 12345...
|
||||||
1 2
|
1 2
|
||||||
3 4
|
3 4
|
||||||
5 6
|
5 6
|
||||||
|
@ -190,10 +194,6 @@ xargs: argument line too long
|
||||||
8
|
8
|
||||||
9
|
9
|
||||||
10
|
10
|
||||||
### Test killing children with --timeout and exit value (failed if timed out)
|
|
||||||
0 0 0
|
|
||||||
2
|
|
||||||
0 0 0
|
|
||||||
xargs Expect: 3 1 2
|
xargs Expect: 3 1 2
|
||||||
3
|
3
|
||||||
1
|
1
|
||||||
|
|
|
@ -13,10 +13,10 @@ echo 1 2 3 4 5 6 7 8 9 10 ; echo 1 2 3 4 5 6 7 8 9 10
|
||||||
1 2 3 4 5 6 7 8 9 10
|
1 2 3 4 5 6 7 8 9 10
|
||||||
### Test of -X {1}-{2} with multiple input sources
|
### Test of -X {1}-{2} with multiple input sources
|
||||||
a-b
|
a-b
|
||||||
a-c a-d
|
a-c
|
||||||
b-c b-d
|
b-c
|
||||||
a-d a-e a-f b-d b-e
|
a-d
|
||||||
b-f c-d c-e c-f
|
b-f
|
||||||
a-d
|
a-d
|
||||||
a-e
|
a-e
|
||||||
a-f
|
a-f
|
||||||
|
|
Loading…
Reference in a new issue