mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
eval $perlexpr as function. Added --plus. Forced --noctrlc if --controlmaster.
Added CITATION. --title for pod2html. Testsuite updates due to LinuxMint15/17 diffs.
This commit is contained in:
parent
6a4bd4911b
commit
9a25177a19
23
CITATION
Normal file
23
CITATION
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
When using programs that use GNU Parallel to process data for publication please cite:
|
||||||
|
|
||||||
|
@article{Tange2011a,
|
||||||
|
title = {GNU Parallel - The Command-Line Power Tool},
|
||||||
|
author = {O. Tange},
|
||||||
|
address = {Frederiksberg, Denmark},
|
||||||
|
journal = {;login: The USENIX Magazine},
|
||||||
|
month = {Feb},
|
||||||
|
number = {1},
|
||||||
|
volume = {36},
|
||||||
|
url = {http://www.gnu.org/s/parallel},
|
||||||
|
year = {2011},
|
||||||
|
pages = {42-47}
|
||||||
|
}
|
||||||
|
|
||||||
|
(Feel free to use \nocite{Tange2011a})
|
||||||
|
|
||||||
|
Or:
|
||||||
|
|
||||||
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
|
||||||
|
This helps funding further development.
|
|
@ -2,3 +2,5 @@ SUBDIRS = src
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cd testsuite; make 1
|
cd testsuite; make 1
|
||||||
|
|
||||||
|
EXTRA_DIST = CITATION
|
||||||
|
|
|
@ -197,6 +197,7 @@ top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
SUBDIRS = src
|
SUBDIRS = src
|
||||||
|
EXTRA_DIST = CITATION
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,7 @@ YYYYMMDD=`yyyymmdd`
|
||||||
git tag -s -m "Released as $YYYYMMDD ('$TAG')" $TAG
|
git tag -s -m "Released as $YYYYMMDD ('$TAG')" $TAG
|
||||||
git tag -s -m "Released as $YYYYMMDD ('$TAG')" $YYYYMMDD
|
git tag -s -m "Released as $YYYYMMDD ('$TAG')" $YYYYMMDD
|
||||||
|
|
||||||
|
git push
|
||||||
|
|
||||||
== Update Savannah ==
|
== Update Savannah ==
|
||||||
|
|
||||||
|
|
|
@ -38,35 +38,35 @@ niceload.1: niceload.pod
|
||||||
|| echo "Warning: pod2man not found. Using old niceload.1"
|
|| echo "Warning: pod2man not found. Using old niceload.1"
|
||||||
|
|
||||||
parallel.html: parallel.pod
|
parallel.html: parallel.pod
|
||||||
pod2html $(srcdir)/parallel.pod > $(srcdir)/parallel.htmln \
|
pod2html --title "GNU Parallel" $(srcdir)/parallel.pod > $(srcdir)/parallel.htmln \
|
||||||
&& mv $(srcdir)/parallel.htmln $(srcdir)/parallel.html \
|
&& mv $(srcdir)/parallel.htmln $(srcdir)/parallel.html \
|
||||||
|| echo "Warning: pod2html not found. Using old parallel.html"
|
|| echo "Warning: pod2html not found. Using old parallel.html"
|
||||||
rm -f $(srcdir)/pod2htm*
|
rm -f $(srcdir)/pod2htm*
|
||||||
|
|
||||||
# Depending on parallel.html to avoid stupid pod2html race condition
|
# Depending on parallel.html to avoid stupid pod2html race condition
|
||||||
parallel_tutorial.html: parallel_tutorial.pod parallel.html
|
parallel_tutorial.html: parallel_tutorial.pod parallel.html
|
||||||
pod2html $(srcdir)/parallel_tutorial.pod > $(srcdir)/parallel_tutorial.htmln \
|
pod2html --title "GNU Parallel tutorial" $(srcdir)/parallel_tutorial.pod > $(srcdir)/parallel_tutorial.htmln \
|
||||||
&& mv $(srcdir)/parallel_tutorial.htmln $(srcdir)/parallel_tutorial.html \
|
&& mv $(srcdir)/parallel_tutorial.htmln $(srcdir)/parallel_tutorial.html \
|
||||||
|| echo "Warning: pod2html not found. Using old parallel_tutorial.html"
|
|| echo "Warning: pod2html not found. Using old parallel_tutorial.html"
|
||||||
rm -f $(srcdir)/pod2htm*
|
rm -f $(srcdir)/pod2htm*
|
||||||
|
|
||||||
# Depending on parallel_tutorial.html to avoid stupid pod2html race condition
|
# Depending on parallel_tutorial.html to avoid stupid pod2html race condition
|
||||||
sem.html: sem.pod parallel_tutorial.html
|
sem.html: sem.pod parallel_tutorial.html
|
||||||
pod2html $(srcdir)/sem.pod > $(srcdir)/sem.htmln \
|
pod2html --title "sem (GNU Parallel)" $(srcdir)/sem.pod > $(srcdir)/sem.htmln \
|
||||||
&& mv $(srcdir)/sem.htmln $(srcdir)/sem.html \
|
&& mv $(srcdir)/sem.htmln $(srcdir)/sem.html \
|
||||||
|| echo "Warning: pod2html not found. Using old sem.html"
|
|| echo "Warning: pod2html not found. Using old sem.html"
|
||||||
rm -f $(srcdir)/pod2htm*
|
rm -f $(srcdir)/pod2htm*
|
||||||
|
|
||||||
# Depending on sem.html to avoid stupid pod2html race condition
|
# Depending on sem.html to avoid stupid pod2html race condition
|
||||||
sql.html: sql sem.html
|
sql.html: sql sem.html
|
||||||
pod2html $(srcdir)/sql > $(srcdir)/sql.htmln \
|
pod2html --title "GNU SQL" $(srcdir)/sql > $(srcdir)/sql.htmln \
|
||||||
&& mv $(srcdir)/sql.htmln $(srcdir)/sql.html \
|
&& mv $(srcdir)/sql.htmln $(srcdir)/sql.html \
|
||||||
|| echo "Warning: pod2html not found. Using old sql.html"
|
|| echo "Warning: pod2html not found. Using old sql.html"
|
||||||
rm -f $(srcdir)/pod2htm*
|
rm -f $(srcdir)/pod2htm*
|
||||||
|
|
||||||
# Depending on sql.html to avoid stupid pod2html race condition
|
# Depending on sql.html to avoid stupid pod2html race condition
|
||||||
niceload.html: niceload.pod sql.html
|
niceload.html: niceload.pod sql.html
|
||||||
pod2html $(srcdir)/niceload.pod > $(srcdir)/niceload.htmln \
|
pod2html --title "GNU niceload" $(srcdir)/niceload.pod > $(srcdir)/niceload.htmln \
|
||||||
&& mv $(srcdir)/niceload.htmln $(srcdir)/niceload.html \
|
&& mv $(srcdir)/niceload.htmln $(srcdir)/niceload.html \
|
||||||
|| echo "Warning: pod2html not found. Using old niceload.html"
|
|| echo "Warning: pod2html not found. Using old niceload.html"
|
||||||
rm -f $(srcdir)/pod2htm*
|
rm -f $(srcdir)/pod2htm*
|
||||||
|
|
90
src/parallel
90
src/parallel
|
@ -572,6 +572,7 @@ sub options_hash {
|
||||||
# Replacement strings
|
# Replacement strings
|
||||||
"parens=s" => \$opt::parens,
|
"parens=s" => \$opt::parens,
|
||||||
"rpl=s" => \@opt::rpl,
|
"rpl=s" => \@opt::rpl,
|
||||||
|
"plus" => \$opt::plus,
|
||||||
"I=s" => \$opt::I,
|
"I=s" => \$opt::I,
|
||||||
"extensionreplace|er=s" => \$opt::U,
|
"extensionreplace|er=s" => \$opt::U,
|
||||||
"U=s" => \$opt::retired,
|
"U=s" => \$opt::retired,
|
||||||
|
@ -739,6 +740,21 @@ sub parse_options {
|
||||||
'{/.}' => 's:.*/::; s:\.[^/.]+$::;',
|
'{/.}' => 's:.*/::; s:\.[^/.]+$::;',
|
||||||
'{.}' => 's:\.[^/.]+$::',
|
'{.}' => 's:\.[^/.]+$::',
|
||||||
);
|
);
|
||||||
|
%Global::plus =
|
||||||
|
(
|
||||||
|
# {} = {+/}/{/}
|
||||||
|
# = {.}.{+.} = {+/}/{/.}.{+.}
|
||||||
|
# = {..}.{+..} = {+/}/{/..}.{+..}
|
||||||
|
# = {...}.{+...} = {+/}/{/...}.{+...}
|
||||||
|
'{+/}' => 's:/[^/]*$::',
|
||||||
|
'{+.}' => 's:.*\.::',
|
||||||
|
'{+..}' => 's:.*\.([^.]*\.):$1:',
|
||||||
|
'{+...}' => 's:.*\.([^.]*\.[^.]*\.):$1:',
|
||||||
|
'{..}' => 's:\.[^/.]+$::; s:\.[^/.]+$::',
|
||||||
|
'{...}' => 's:\.[^/.]+$::; s:\.[^/.]+$::; s:\.[^/.]+$::',
|
||||||
|
'{/..}' => 's:.*/::; s:\.[^/.]+$::; s:\.[^/.]+$::',
|
||||||
|
'{/...}' => 's:.*/::; s:\.[^/.]+$::; s:\.[^/.]+$::; s:\.[^/.]+$::',
|
||||||
|
);
|
||||||
# Modifiable copy of %Global::replace
|
# Modifiable copy of %Global::replace
|
||||||
%Global::rpl = %Global::replace;
|
%Global::rpl = %Global::replace;
|
||||||
$Global::parens = "{==}";
|
$Global::parens = "{==}";
|
||||||
|
@ -784,6 +800,7 @@ sub parse_options {
|
||||||
my $parenslen = 0.5*length $Global::parens;
|
my $parenslen = 0.5*length $Global::parens;
|
||||||
$Global::parensleft = substr($Global::parens,0,$parenslen);
|
$Global::parensleft = substr($Global::parens,0,$parenslen);
|
||||||
$Global::parensright = substr($Global::parens,$parenslen);
|
$Global::parensright = substr($Global::parens,$parenslen);
|
||||||
|
if(defined $opt::plus) { %Global::rpl = (%Global::plus,%Global::rpl); }
|
||||||
if(defined $opt::I) { rpl('{}',$opt::I); }
|
if(defined $opt::I) { rpl('{}',$opt::I); }
|
||||||
if(defined $opt::U) { rpl('{.}',$opt::U); }
|
if(defined $opt::U) { rpl('{.}',$opt::U); }
|
||||||
if(defined $opt::i and $opt::i) { rpl('{}',$opt::i); }
|
if(defined $opt::i and $opt::i) { rpl('{}',$opt::i); }
|
||||||
|
@ -828,6 +845,7 @@ sub parse_options {
|
||||||
not defined $opt::recend) { $opt::recend = "\n"; }
|
not defined $opt::recend) { $opt::recend = "\n"; }
|
||||||
if(not defined $opt::blocksize) { $opt::blocksize = "1M"; }
|
if(not defined $opt::blocksize) { $opt::blocksize = "1M"; }
|
||||||
$opt::blocksize = multiply_binary_prefix($opt::blocksize);
|
$opt::blocksize = multiply_binary_prefix($opt::blocksize);
|
||||||
|
if(defined $opt::controlmaster) { $opt::noctrlc = 1; }
|
||||||
if(defined $opt::semaphore) { $Global::semaphore = 1; }
|
if(defined $opt::semaphore) { $Global::semaphore = 1; }
|
||||||
if(defined $opt::semaphoretimeout) { $Global::semaphore = 1; }
|
if(defined $opt::semaphoretimeout) { $Global::semaphore = 1; }
|
||||||
if(defined $opt::semaphorename) { $Global::semaphore = 1; }
|
if(defined $opt::semaphorename) { $Global::semaphore = 1; }
|
||||||
|
@ -1358,8 +1376,10 @@ sub shell_quote_scalar {
|
||||||
# $shell_quoted = string quoted with \ as needed by the shell
|
# $shell_quoted = string quoted with \ as needed by the shell
|
||||||
my $a = $_[0];
|
my $a = $_[0];
|
||||||
if(defined $a) {
|
if(defined $a) {
|
||||||
$a =~ s/([\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\*\>\<\~\|\; \"\!\$\&\'\202-\377])/\\$1/g;
|
# $a =~ s/([\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\*\>\<\~\|\; \"\!\$\&\'\202-\377])/\\$1/g;
|
||||||
$a =~ s/[\n]/'\n'/g; # filenames with '\n' is quoted using \'
|
# This is 1% faster than the above
|
||||||
|
$a =~ s/[\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\*\>\<\~\|\; \"\!\$\&\'\202-\377]/\\$&/go;
|
||||||
|
$a =~ s/[\n]/'\n'/go; # filenames with '\n' is quoted using \'
|
||||||
}
|
}
|
||||||
return $a;
|
return $a;
|
||||||
}
|
}
|
||||||
|
@ -2064,7 +2084,7 @@ sub parse_sshlogin {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
debug("start", "sshlogin: ", my_dump(%Global::host),"\n");
|
# debug("start", "sshlogin: ", my_dump(%Global::host),"\n");
|
||||||
if($opt::transfer or @opt::return or $opt::cleanup or @opt::basefile) {
|
if($opt::transfer or @opt::return or $opt::cleanup or @opt::basefile) {
|
||||||
if(not remote_hosts()) {
|
if(not remote_hosts()) {
|
||||||
# There are no remote hosts
|
# There are no remote hosts
|
||||||
|
@ -2507,6 +2527,7 @@ sub usage {
|
||||||
print join
|
print join
|
||||||
("\n",
|
("\n",
|
||||||
"Usage:",
|
"Usage:",
|
||||||
|
"",
|
||||||
"$Global::progname [options] [command [arguments]] < list_of_arguments",
|
"$Global::progname [options] [command [arguments]] < list_of_arguments",
|
||||||
"$Global::progname [options] [command [arguments]] (::: arguments|:::: argfile(s))...",
|
"$Global::progname [options] [command [arguments]] (::: arguments|:::: argfile(s))...",
|
||||||
"cat ... | $Global::progname --pipe [options] [command [arguments]]",
|
"cat ... | $Global::progname --pipe [options] [command [arguments]]",
|
||||||
|
@ -2515,8 +2536,10 @@ sub usage {
|
||||||
"-k Keep same order",
|
"-k Keep same order",
|
||||||
"-X Multiple arguments with context replace",
|
"-X Multiple arguments with context replace",
|
||||||
"--colsep regexp Split input on regexp for positional replacements",
|
"--colsep regexp Split input on regexp for positional replacements",
|
||||||
"{} {.} {/} {/.} {#} {%} Replacement strings",
|
"{} {.} {/} {/.} {#} {%} {= perl code =} Replacement strings",
|
||||||
"{3} {3.} {3/} {3/.} Positional replacement strings",
|
"{3} {3.} {3/} {3/.} {=3 perl code =} Positional replacement strings",
|
||||||
|
"With --plus: {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =",
|
||||||
|
" {+/}/{/..}.{+..} = {...}.{+...} = {+/}/{/...}.{+...}",
|
||||||
"",
|
"",
|
||||||
"-S sshlogin Example: foo\@server.example.com",
|
"-S sshlogin Example: foo\@server.example.com",
|
||||||
"--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins",
|
"--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins",
|
||||||
|
@ -4098,8 +4121,7 @@ sub no_of_cpus_irix {
|
||||||
# Returns:
|
# Returns:
|
||||||
# Number of physical CPUs on IRIX
|
# Number of physical CPUs on IRIX
|
||||||
# undef if not IRIX
|
# undef if not IRIX
|
||||||
my $no_of_cpus =
|
my $no_of_cpus = `hinv | grep HZ | grep Processor | awk '{print \$1}'`;
|
||||||
(`hinv | grep HZ | grep Processor | awk '{print \$1}'`);
|
|
||||||
return $no_of_cpus;
|
return $no_of_cpus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4107,8 +4129,7 @@ sub no_of_cores_irix {
|
||||||
# Returns:
|
# Returns:
|
||||||
# Number of CPU cores on IRIX
|
# Number of CPU cores on IRIX
|
||||||
# undef if not IRIX
|
# undef if not IRIX
|
||||||
my $no_of_cores =
|
my $no_of_cores = `hinv | grep HZ | grep Processor | awk '{print \$1}'`;
|
||||||
(`hinv | grep HZ | grep Processor | awk '{print \$1}'`);
|
|
||||||
return $no_of_cores;
|
return $no_of_cores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4116,8 +4137,7 @@ sub no_of_cpus_tru64 {
|
||||||
# Returns:
|
# Returns:
|
||||||
# Number of physical CPUs on Tru64
|
# Number of physical CPUs on Tru64
|
||||||
# undef if not Tru64
|
# undef if not Tru64
|
||||||
my $no_of_cpus =
|
my $no_of_cpus = `sizer -pr`;
|
||||||
(`sizer -pr`);
|
|
||||||
return $no_of_cpus;
|
return $no_of_cpus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4125,8 +4145,7 @@ sub no_of_cores_tru64 {
|
||||||
# Returns:
|
# Returns:
|
||||||
# Number of CPU cores on Tru64
|
# Number of CPU cores on Tru64
|
||||||
# undef if not Tru64
|
# undef if not Tru64
|
||||||
my $no_of_cores =
|
my $no_of_cores = `sizer -pr`;
|
||||||
(`sizer -pr`);
|
|
||||||
return $no_of_cores;
|
return $no_of_cores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5800,18 +5819,18 @@ sub push {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $record = shift;
|
my $record = shift;
|
||||||
push @{$self->{'arg_list'}}, $record;
|
push @{$self->{'arg_list'}}, $record;
|
||||||
my $arg_no = ($self->number_of_args()-1) * ($#$record+1);
|
|
||||||
|
|
||||||
my $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
|
my $quote_arg = $Global::noquote ? 0 : not $Global::quoting;
|
||||||
my $rep;
|
my $rep;
|
||||||
for my $arg (@$record) {
|
for my $arg (@$record) {
|
||||||
$arg_no++;
|
|
||||||
if(defined $arg) {
|
if(defined $arg) {
|
||||||
for my $perlexpr (keys %{$self->{'replacecount'}}) {
|
for my $perlexpr (keys %{$self->{'replacecount'}}) {
|
||||||
$rep = $arg->replace($perlexpr,$quote_arg,$self);
|
# 50% faster than below
|
||||||
$self->{'len'}{$perlexpr} += length $rep;
|
$self->{'len'}{$perlexpr} += length $arg->replace($perlexpr,$quote_arg,$self);
|
||||||
::debug("length", "Length: ", length $rep,
|
# $rep = $arg->replace($perlexpr,$quote_arg,$self);
|
||||||
"(", $perlexpr, "=>", $rep, ")\n");
|
# $self->{'len'}{$perlexpr} += length $rep;
|
||||||
|
# ::debug("length", "Length: ", length $rep,
|
||||||
|
# "(", $perlexpr, "=>", $rep, ")\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6207,7 +6226,7 @@ sub replace_placeholders {
|
||||||
@target = ::shell_quote(@target);
|
@target = ::shell_quote(@target);
|
||||||
}
|
}
|
||||||
|
|
||||||
::debug("replace", "%replace=".(::my_dump(%replace))."\n");
|
# ::debug("replace", "%replace=",::my_dump(%replace),"\n");
|
||||||
if(%replace) {
|
if(%replace) {
|
||||||
# Substitute the replace strings with the replacement values
|
# Substitute the replace strings with the replacement values
|
||||||
# Must be sorted by length if a short word is a substring of a long word
|
# Must be sorted by length if a short word is a substring of a long word
|
||||||
|
@ -6795,22 +6814,22 @@ sub read_arg_from_fh {
|
||||||
my $prepend = undef;
|
my $prepend = undef;
|
||||||
my $arg;
|
my $arg;
|
||||||
do {{
|
do {{
|
||||||
if(eof($fh)) {
|
# This makes 10% faster
|
||||||
|
if(not ($arg = <$fh>)) {
|
||||||
if(defined $prepend) {
|
if(defined $prepend) {
|
||||||
return Arg->new($prepend);
|
return Arg->new($prepend);
|
||||||
} else {
|
} else {
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$arg = <$fh>;
|
# ::debug("run", "read $arg\n");
|
||||||
::debug("run", "read $arg\n");
|
|
||||||
# Remove delimiter
|
# Remove delimiter
|
||||||
$arg =~ s:$/$::;
|
$arg =~ s:$/$::;
|
||||||
if($Global::end_of_file_string and
|
if($Global::end_of_file_string and
|
||||||
$arg eq $Global::end_of_file_string) {
|
$arg eq $Global::end_of_file_string) {
|
||||||
# Ignore the rest of input file
|
# Ignore the rest of input file
|
||||||
while (<$fh>) {}
|
while (<$fh>) {}
|
||||||
::debug("run", "EOF-string $arg\n");
|
# ::debug("run", "EOF-string $arg\n");
|
||||||
if(defined $prepend) {
|
if(defined $prepend) {
|
||||||
return Arg->new($prepend);
|
return Arg->new($prepend);
|
||||||
} else {
|
} else {
|
||||||
|
@ -6878,7 +6897,7 @@ sub new {
|
||||||
sub replace {
|
sub replace {
|
||||||
# Calculates the corresponding value for a given perl expression
|
# Calculates the corresponding value for a given perl expression
|
||||||
# Returns:
|
# Returns:
|
||||||
# The calculated string unquoted
|
# The calculated string (quoted if asked for)
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $perlexpr = shift; # E.g. $_=$_ or s/.gz//
|
my $perlexpr = shift; # E.g. $_=$_ or s/.gz//
|
||||||
my $quote = (shift) ? 1 : 0; # should the string be quoted?
|
my $quote = (shift) ? 1 : 0; # should the string be quoted?
|
||||||
|
@ -6887,15 +6906,26 @@ sub replace {
|
||||||
my $job = shift;
|
my $job = shift;
|
||||||
$perlexpr =~ s/^-?\d+ //; # Positional replace treated as normal replace
|
$perlexpr =~ s/^-?\d+ //; # Positional replace treated as normal replace
|
||||||
if(not defined $self->{"rpl",0,$perlexpr}) {
|
if(not defined $self->{"rpl",0,$perlexpr}) {
|
||||||
my $s;
|
local $_;
|
||||||
if($Global::trim eq "n") {
|
if($Global::trim eq "n") {
|
||||||
$s = $self->{'orig'};
|
$_ = $self->{'orig'};
|
||||||
} else {
|
} else {
|
||||||
$s = trim_of($self->{'orig'});
|
$_ = trim_of($self->{'orig'});
|
||||||
}
|
}
|
||||||
local $_ = $s;
|
|
||||||
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
|
::debug("replace", "eval ", $perlexpr, " ", $_, "\n");
|
||||||
eval $perlexpr;
|
if(not $Global::perleval{$perlexpr}) {
|
||||||
|
# Make an anonymous function of the $perlexpr
|
||||||
|
# And more importantly: Compile it only once
|
||||||
|
if($Global::perleval{$perlexpr} = eval('sub { my $job = shift; '.$perlexpr.' }')) {
|
||||||
|
# All is good
|
||||||
|
} else {
|
||||||
|
# The eval failed. Maybe $perlexpr is invalid perl?
|
||||||
|
::error("Cannot use $perlexpr\n");
|
||||||
|
::wait_and_exit(255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Execute the function
|
||||||
|
$Global::perleval{$perlexpr}->($job);
|
||||||
$self->{"rpl",0,$perlexpr} = $_;
|
$self->{"rpl",0,$perlexpr} = $_;
|
||||||
}
|
}
|
||||||
if(not defined $self->{"rpl",$quote,$perlexpr}) {
|
if(not defined $self->{"rpl",$quote,$perlexpr}) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
=encoding utf8
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
parallel - build and execute shell command lines from standard input in parallel
|
parallel - build and execute shell command lines from standard input in parallel
|
||||||
|
|
|
@ -172,7 +172,7 @@ 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
|
||||||
|
|
||||||
The command cannot contain the character \257 (¯).
|
The command cannot contain the character \257 (¯).
|
||||||
|
|
||||||
@item @strong{@{@}} (alpha testing)
|
@item @strong{@{@}} (alpha testing)
|
||||||
@anchor{@strong{@{@}} (alpha testing)}
|
@anchor{@strong{@{@}} (alpha testing)}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
|
||||||
.\"
|
.\"
|
||||||
.\" Standard preamble:
|
.\" Standard preamble:
|
||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
|
@ -38,6 +38,8 @@
|
||||||
. ds PI \(*p
|
. ds PI \(*p
|
||||||
. ds L" ``
|
. ds L" ``
|
||||||
. ds R" ''
|
. ds R" ''
|
||||||
|
. ds C`
|
||||||
|
. ds C'
|
||||||
'br\}
|
'br\}
|
||||||
.\"
|
.\"
|
||||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||||
|
@ -48,17 +50,24 @@
|
||||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||||
.\" output yourself in some meaningful fashion.
|
.\" output yourself in some meaningful fashion.
|
||||||
.ie \nF \{\
|
.\"
|
||||||
|
.\" Avoid warning from groff about undefined register 'F'.
|
||||||
|
.de IX
|
||||||
|
..
|
||||||
|
.nr rF 0
|
||||||
|
.if \n(.g .if rF .nr rF 1
|
||||||
|
.if (\n(rF:(\n(.g==0)) \{
|
||||||
|
. if \nF \{
|
||||||
. de IX
|
. de IX
|
||||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||||
..
|
..
|
||||||
|
. if !\nF==2 \{
|
||||||
. nr % 0
|
. nr % 0
|
||||||
. rr F
|
. nr F 2
|
||||||
. \}
|
. \}
|
||||||
.el \{\
|
|
||||||
. de IX
|
|
||||||
..
|
|
||||||
. \}
|
. \}
|
||||||
|
.\}
|
||||||
|
.rr rF
|
||||||
.\"
|
.\"
|
||||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||||
|
@ -124,7 +133,7 @@
|
||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "PARALLEL_TUTORIAL 1"
|
.IX Title "PARALLEL_TUTORIAL 1"
|
||||||
.TH PARALLEL_TUTORIAL 1 "2014-07-20" "20140711" "parallel"
|
.TH PARALLEL_TUTORIAL 1 "2014-07-26" "20140722" "parallel"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
|
@ -2127,7 +2136,7 @@ where command_B is slow, and you want to speed up command_B.
|
||||||
.SS "Chunk size"
|
.SS "Chunk size"
|
||||||
.IX Subsection "Chunk size"
|
.IX Subsection "Chunk size"
|
||||||
By default \s-1GNU\s0 Parallel will start an instance of command_B, read a
|
By default \s-1GNU\s0 Parallel will start an instance of command_B, read a
|
||||||
chunk of 1 \s-1MB\s0, and pass that to the instance. Then start another
|
chunk of 1 \s-1MB,\s0 and pass that to the instance. Then start another
|
||||||
instance, read another chunk, and pass that to the second instance.
|
instance, read another chunk, and pass that to the second instance.
|
||||||
.PP
|
.PP
|
||||||
.Vb 1
|
.Vb 1
|
||||||
|
@ -2148,7 +2157,7 @@ Output (the order may be different):
|
||||||
.PP
|
.PP
|
||||||
The size of the chunk is not exactly 1 \s-1MB\s0 because \s-1GNU\s0 Parallel only
|
The size of the chunk is not exactly 1 \s-1MB\s0 because \s-1GNU\s0 Parallel only
|
||||||
passes full lines \- never half a line, thus the blocksize is only
|
passes full lines \- never half a line, thus the blocksize is only
|
||||||
average 1 \s-1MB\s0. You can change the block size to 2 \s-1MB\s0 with \-\-block:
|
average 1 \s-1MB.\s0 You can change the block size to 2 \s-1MB\s0 with \-\-block:
|
||||||
.PP
|
.PP
|
||||||
.Vb 1
|
.Vb 1
|
||||||
\& cat num1000000 | parallel \-\-pipe \-\-block 2M wc
|
\& cat num1000000 | parallel \-\-pipe \-\-block 2M wc
|
||||||
|
|
File diff suppressed because it is too large
Load diff
BIN
src/sem.pdf
BIN
src/sem.pdf
Binary file not shown.
|
@ -58,7 +58,7 @@ installparallel: ../src/parallel
|
||||||
|
|
||||||
startdb:
|
startdb:
|
||||||
#echo shutdown abort | sudo su - oracle -c "sqlplus / as sysdba"
|
#echo shutdown abort | sudo su - oracle -c "sqlplus / as sysdba"
|
||||||
sudo parallel /etc/init.d/{} restart ::: postgresql mysql # oracle-xe
|
sudo parallel /etc/init.d/{} status '||' /etc/init.d/{} restart ::: postgresql mysql # oracle-xe
|
||||||
VBoxManage startvm OracleXE || true
|
VBoxManage startvm OracleXE || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -5,12 +5,15 @@ echo '### Test installation missing pod2*'
|
||||||
parallel which ::: pod2html pod2man pod2texi pod2pdf | sudo parallel mv {} {}.hidden
|
parallel which ::: pod2html pod2man pod2texi pod2pdf | sudo parallel mv {} {}.hidden
|
||||||
|
|
||||||
cd ~/privat/parallel
|
cd ~/privat/parallel
|
||||||
|
# Make a .tar.gz file
|
||||||
stdout make dist | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
|
stdout make dist | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
|
||||||
LAST=$(ls *tar.gz | tail -n1)
|
LAST=$(ls *tar.gz | tail -n1)
|
||||||
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
rm -rf parallel-20??????/
|
rm -rf parallel-20??????/
|
||||||
tar xf ~/privat/parallel/$LAST
|
tar xf ~/privat/parallel/$LAST
|
||||||
cd parallel-20??????/
|
cd parallel-20??????/
|
||||||
|
# Make sure files depending on *.pod have to be rebuilt
|
||||||
touch src/*pod src/sql
|
touch src/*pod src/sql
|
||||||
./configure && sudo stdout make install | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
|
./configure && sudo stdout make install | perl -pe 's/make\[\d\]/make[0]/g;s/\d{8}/00000000/g'
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ echo '### bug #42055: --pipe -a bigfile should not require sequential reading of
|
||||||
parallel --pipepart -a /etc/passwd -l 1 should not be run
|
parallel --pipepart -a /etc/passwd -l 1 should not be run
|
||||||
|
|
||||||
echo '### --tmux test - check termination'
|
echo '### --tmux test - check termination'
|
||||||
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | parallel --tmux echo {} :::: - ::: a b
|
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | stdout parallel --tmux echo {} :::: - ::: a b | perl -pe 's/\d/0/g'
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -12,7 +12,7 @@ echo '### Test --keeporder'
|
||||||
(seq 0 2) | parallel --keeporder -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
(seq 0 2) | parallel --keeporder -j100% -S 1/:,2/parallel@parallel-server2 -q perl -e 'sleep 1;print "job{}\n";exit({})'
|
||||||
|
|
||||||
echo '### Test SIGTERM'
|
echo '### Test SIGTERM'
|
||||||
parallel -k -j9 sleep 3';' echo ::: {1..99} >/tmp/$$ 2>&1 &
|
parallel -k -j20 sleep 3';' echo ::: {1..99} >/tmp/$$ 2>&1 &
|
||||||
A=$!
|
A=$!
|
||||||
sleep 5; kill -TERM $A
|
sleep 5; kill -TERM $A
|
||||||
wait
|
wait
|
||||||
|
|
|
@ -43,7 +43,7 @@ echo "#2/ssh -l tange nothing" >>/tmp/parallel-sshlogin
|
||||||
seq 1 10 | parallel -k --sshloginfile /tmp/parallel-sshlogin echo
|
seq 1 10 | parallel -k --sshloginfile /tmp/parallel-sshlogin echo
|
||||||
|
|
||||||
echo '### Check forced number of CPUs being respected'
|
echo '### Check forced number of CPUs being respected'
|
||||||
stdout seq 1 20 | parallel -k -j+0 -S 1/:,7/$SSHLOGIN1 "hostname; echo {} >/dev/null"
|
seq 1 20 | stdout parallel -k -j+0 -S 1/:,7/$SSHLOGIN1 "hostname; echo {} >/dev/null" | sort
|
||||||
|
|
||||||
echo '### Check more than 9 simultaneous sshlogins'
|
echo '### Check more than 9 simultaneous sshlogins'
|
||||||
seq 1 11 | parallel -k -j0 -S "ssh $SSHLOGIN1" echo
|
seq 1 11 | parallel -k -j0 -S "ssh $SSHLOGIN1" echo
|
||||||
|
|
|
@ -5,20 +5,20 @@ SERVER2=parallel-server2
|
||||||
|
|
||||||
echo '### Test $PARALLEL - single line'
|
echo '### Test $PARALLEL - single line'
|
||||||
echo | PARALLEL=--number-of-cpus parallel
|
echo | PARALLEL=--number-of-cpus parallel
|
||||||
seq 1 2 | PARALLEL="-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" parallel -kvv echo
|
(echo 1; echo 1) | PARALLEL="-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" parallel -kv hostname\; echo | sort
|
||||||
|
|
||||||
echo '### Test $PARALLEL - multi line'
|
echo '### Test $PARALLEL - multi line'
|
||||||
seq 1 2 | PARALLEL="-Sparallel\@$SERVER1
|
(echo 1; echo 1) | PARALLEL="-Sparallel\@$SERVER1
|
||||||
-Sssh\ -l\ parallel\ $SERVER2
|
-Sssh\ -l\ parallel\ $SERVER2
|
||||||
-j1" parallel -kvv echo
|
-j1" parallel -kv hostname\; echo | sort
|
||||||
|
|
||||||
echo '### Test ~/.parallel/config - single line'
|
echo '### Test ~/.parallel/config - single line'
|
||||||
echo "-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" > ~/.parallel/config
|
echo "-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" > ~/.parallel/config
|
||||||
seq 1 2 | parallel -kvv echo
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
||||||
|
|
||||||
echo '### Test ~/.parallel/config - multi line'
|
echo '### Test ~/.parallel/config - multi line'
|
||||||
echo "-Sparallel\@$SERVER1
|
echo "-Sparallel\@$SERVER1
|
||||||
-Sssh\ -l\ parallel\ $SERVER2
|
-Sssh\ -l\ parallel\ $SERVER2
|
||||||
-j1" > ~/.parallel/config
|
-j1" > ~/.parallel/config
|
||||||
seq 1 2 | parallel -kvv echo
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
||||||
rm ~/.parallel/config
|
rm ~/.parallel/config
|
||||||
|
|
|
@ -5,26 +5,6 @@ test -d "parallel-00000000" || mkdir "parallel-00000000"
|
||||||
(cd src && make top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \
|
(cd src && make top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \
|
||||||
am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
|
am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
|
||||||
make[0]: Entering directory `/home/tange/privat/parallel/src'
|
make[0]: Entering directory `/home/tange/privat/parallel/src'
|
||||||
pod2man --release='00000000' --center='parallel' \
|
|
||||||
--section=1 ./parallel.pod > ./parallel.1n \
|
|
||||||
&& mv ./parallel.1n ./parallel.1 \
|
|
||||||
|| echo "Warning: pod2man not found. Using old parallel.1"
|
|
||||||
/bin/bash: pod2man: command not found
|
|
||||||
Warning: pod2man not found. Using old parallel.1
|
|
||||||
pod2html ./parallel.pod > ./parallel.htmln \
|
|
||||||
&& mv ./parallel.htmln ./parallel.html \
|
|
||||||
|| echo "Warning: pod2html not found. Using old parallel.html"
|
|
||||||
/bin/bash: pod2html: command not found
|
|
||||||
Warning: pod2html not found. Using old parallel.html
|
|
||||||
rm -f ./pod2htm*
|
|
||||||
pod2texi --output=./parallel.texi ./parallel.pod \
|
|
||||||
|| echo "Warning: pod2texi not found. Using old parallel.texi"
|
|
||||||
/bin/bash: pod2texi: command not found
|
|
||||||
Warning: pod2texi not found. Using old parallel.texi
|
|
||||||
pod2pdf --output-file ./parallel.pdf ./parallel.pod --title "GNU Parallel" \
|
|
||||||
|| echo "Warning: pod2pdf not found. Using old parallel.pdf"
|
|
||||||
/bin/bash: pod2pdf: command not found
|
|
||||||
Warning: pod2pdf not found. Using old parallel.pdf
|
|
||||||
make[0]: Leaving directory `/home/tange/privat/parallel/src'
|
make[0]: Leaving directory `/home/tange/privat/parallel/src'
|
||||||
test -n "" \
|
test -n "" \
|
||||||
|| find "parallel-00000000" -type d ! -perm -755 \
|
|| find "parallel-00000000" -type d ! -perm -755 \
|
||||||
|
|
|
@ -75,5 +75,5 @@ parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines
|
||||||
parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L.
|
parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L.
|
||||||
echo '### --tmux test - check termination'
|
echo '### --tmux test - check termination'
|
||||||
### --tmux test - check termination
|
### --tmux test - check termination
|
||||||
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | parallel --tmux echo {} :::: - ::: a b
|
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | stdout parallel --tmux echo {} :::: - ::: a b | perl -pe 's/\d/0/g'
|
||||||
See output with: tmux attach -t p6522
|
See output with: tmux attach -t p00000
|
||||||
|
|
|
@ -180,6 +180,7 @@ echo "# --recend '' --files --halt-on-error"
|
||||||
echo '### Test of -j filename - non-existent file'; nice stdout parallel -j no_such_file echo ::: 1
|
echo '### Test of -j filename - non-existent file'; nice stdout parallel -j no_such_file echo ::: 1
|
||||||
### Test of -j filename - non-existent file
|
### Test of -j filename - non-existent file
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
parallel [options] [command [arguments]] < list_of_arguments
|
parallel [options] [command [arguments]] < list_of_arguments
|
||||||
parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
|
parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
|
||||||
cat ... | parallel --pipe [options] [command [arguments]]
|
cat ... | parallel --pipe [options] [command [arguments]]
|
||||||
|
@ -188,8 +189,10 @@ cat ... | parallel --pipe [options] [command [arguments]]
|
||||||
-k Keep same order
|
-k Keep same order
|
||||||
-X Multiple arguments with context replace
|
-X Multiple arguments with context replace
|
||||||
--colsep regexp Split input on regexp for positional replacements
|
--colsep regexp Split input on regexp for positional replacements
|
||||||
{} {.} {/} {/.} {#} {%} Replacement strings
|
{} {.} {/} {/.} {#} {%} {= perl code =} Replacement strings
|
||||||
{3} {3.} {3/} {3/.} Positional replacement strings
|
{3} {3.} {3/} {3/.} {=3 perl code =} Positional replacement strings
|
||||||
|
With --plus: {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =
|
||||||
|
{+/}/{/..}.{+..} = {...}.{+...} = {+/}/{/...}.{+...}
|
||||||
|
|
||||||
-S sshlogin Example: foo@server.example.com
|
-S sshlogin Example: foo@server.example.com
|
||||||
--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins
|
--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
### Test -k
|
### Test -k
|
||||||
parallel: Warning: Only enough file handles to run 8 jobs in parallel.
|
parallel: Warning: Only enough file handles to run 9 jobs in parallel.
|
||||||
Raising ulimit -n or /etc/security/limits.conf may help.
|
Raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
begin
|
begin
|
||||||
1
|
1
|
||||||
|
@ -9,8 +9,8 @@ begin
|
||||||
5
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
parallel: Warning: No more file handles. Raising ulimit -n or /etc/security/limits.conf may help.
|
|
||||||
8
|
8
|
||||||
|
parallel: Warning: No more file handles. Raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
9
|
9
|
||||||
10
|
10
|
||||||
11
|
11
|
||||||
|
@ -51,6 +51,8 @@ job2
|
||||||
14
|
14
|
||||||
15
|
15
|
||||||
16
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
|
@ -61,8 +63,8 @@ job2
|
||||||
9
|
9
|
||||||
Raising ulimit -n or /etc/security/limits.conf may help.
|
Raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
parallel: SIGTERM received. No new jobs will be started.
|
parallel: SIGTERM received. No new jobs will be started.
|
||||||
parallel: Waiting for these 8 jobs to finish. Send SIGTERM again to stop now.
|
parallel: Waiting for these 9 jobs to finish. Send SIGTERM again to stop now.
|
||||||
parallel: Warning: Only enough file handles to run 8 jobs in parallel.
|
parallel: Warning: Only enough file handles to run 9 jobs in parallel.
|
||||||
parallel: sleep 3; echo 10
|
parallel: sleep 3; echo 10
|
||||||
parallel: sleep 3; echo 11
|
parallel: sleep 3; echo 11
|
||||||
parallel: sleep 3; echo 12
|
parallel: sleep 3; echo 12
|
||||||
|
@ -70,7 +72,8 @@ parallel: sleep 3; echo 13
|
||||||
parallel: sleep 3; echo 14
|
parallel: sleep 3; echo 14
|
||||||
parallel: sleep 3; echo 15
|
parallel: sleep 3; echo 15
|
||||||
parallel: sleep 3; echo 16
|
parallel: sleep 3; echo 16
|
||||||
parallel: sleep 3; echo 9
|
parallel: sleep 3; echo 17
|
||||||
|
parallel: sleep 3; echo 18
|
||||||
### Test bug: empty line for | sh with -k
|
### Test bug: empty line for | sh with -k
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
|
|
|
@ -383,8 +383,8 @@ line 2
|
||||||
### Test --no-run-if-empty and -r: This should give no output
|
### Test --no-run-if-empty and -r: This should give no output
|
||||||
### Test --help and -h: Help output (just check we get the same amount of lines)
|
### Test --help and -h: Help output (just check we get the same amount of lines)
|
||||||
Output from -h and --help
|
Output from -h and --help
|
||||||
28
|
31
|
||||||
28
|
31
|
||||||
### Test --version: Version output (just check we get the same amount of lines)
|
### Test --version: Version output (just check we get the same amount of lines)
|
||||||
12
|
12
|
||||||
### Test --verbose and -t
|
### Test --verbose and -t
|
||||||
|
|
|
@ -79,6 +79,18 @@ parallel: Warning: --cleanup ignored as there are no remote --sshlogin.
|
||||||
10
|
10
|
||||||
### Check forced number of CPUs being respected
|
### Check forced number of CPUs being respected
|
||||||
aspire
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
|
aspire
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
|
@ -86,18 +98,6 @@ redhat9.tange.dk
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
redhat9.tange.dk
|
redhat9.tange.dk
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
aspire
|
|
||||||
### Check more than 9 simultaneous sshlogins
|
### Check more than 9 simultaneous sshlogins
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
|
|
@ -76,15 +76,15 @@ ls: tmp/parallel.file*: No such file or directory
|
||||||
OK
|
OK
|
||||||
Input for ssh
|
Input for ssh
|
||||||
parallel@parallel-server1 mkdir -p ./.
|
parallel@parallel-server1 mkdir -p ./.
|
||||||
-l parallel parallel-server1 rsync --server -lDrRze.iLsf . ./.
|
-l parallel parallel-server1 rsync --server -lDrRze.iLs . ./.
|
||||||
-tt -oLogLevel=quiet parallel@parallel-server1 eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ 2\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=2\;export PARALLEL_SEQ\; PARALLEL_PID=00000\;export PARALLEL_PID` ; tty >/dev/null && stty isig -onlcr -echo;cat tmp/parallel.file.'
|
-tt -oLogLevel=quiet parallel@parallel-server1 eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ 2\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=2\;export PARALLEL_SEQ\; PARALLEL_PID=00000\;export PARALLEL_PID` ; tty >/dev/null && stty isig -onlcr -echo;cat tmp/parallel.file.'
|
||||||
'newline2 > tmp/parallel.file.'
|
'newline2 > tmp/parallel.file.'
|
||||||
'newline2.out;cat tmp/parallel.file.'
|
'newline2.out;cat tmp/parallel.file.'
|
||||||
'newline2 > tmp/parallel.file.'
|
'newline2 > tmp/parallel.file.'
|
||||||
'newline2.out2
|
'newline2.out2
|
||||||
-l parallel parallel-server1 cd ././tmp; rsync --server --sender -lDrRze.iLsf . ./parallel.file.'
|
-l parallel parallel-server1 cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newline2.out
|
'newline2.out
|
||||||
-l parallel parallel-server1 cd ././tmp; rsync --server --sender -lDrRze.iLsf . ./parallel.file.'
|
-l parallel parallel-server1 cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newline2.out2
|
'newline2.out2
|
||||||
parallel@parallel-server1 (rm -f ./tmp/parallel.file.'
|
parallel@parallel-server1 (rm -f ./tmp/parallel.file.'
|
||||||
'newline2; rmdir ./tmp/ ./ 2>/dev/null;)
|
'newline2; rmdir ./tmp/ ./ 2>/dev/null;)
|
||||||
|
@ -93,15 +93,15 @@ parallel@parallel-server1 (rm -f ./tmp/parallel.file.'
|
||||||
parallel@parallel-server1 (rm -f ./tmp/parallel.file.'
|
parallel@parallel-server1 (rm -f ./tmp/parallel.file.'
|
||||||
'newline2.out2; rmdir ./tmp/ ./ 2>/dev/null;)
|
'newline2.out2; rmdir ./tmp/ ./ 2>/dev/null;)
|
||||||
parallel@parallel-server2 mkdir -p ./.
|
parallel@parallel-server2 mkdir -p ./.
|
||||||
-l parallel parallel-server2 rsync --server -lDrRze.iLsf . ./.
|
-l parallel parallel-server2 rsync --server -lDrRze.iLs . ./.
|
||||||
-tt -oLogLevel=quiet parallel@parallel-server2 eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ 1\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=1\;export PARALLEL_SEQ\; PARALLEL_PID=00000\;export PARALLEL_PID` ; tty >/dev/null && stty isig -onlcr -echo;cat tmp/parallel.file.'
|
-tt -oLogLevel=quiet parallel@parallel-server2 eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ 1\; setenv PARALLEL_PID 00000 || echo PARALLEL_SEQ=1\;export PARALLEL_SEQ\; PARALLEL_PID=00000\;export PARALLEL_PID` ; tty >/dev/null && stty isig -onlcr -echo;cat tmp/parallel.file.'
|
||||||
'newline1 > tmp/parallel.file.'
|
'newline1 > tmp/parallel.file.'
|
||||||
'newline1.out;cat tmp/parallel.file.'
|
'newline1.out;cat tmp/parallel.file.'
|
||||||
'newline1 > tmp/parallel.file.'
|
'newline1 > tmp/parallel.file.'
|
||||||
'newline1.out2
|
'newline1.out2
|
||||||
-l parallel parallel-server2 cd ././tmp; rsync --server --sender -lDrRze.iLsf . ./parallel.file.'
|
-l parallel parallel-server2 cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newline1.out
|
'newline1.out
|
||||||
-l parallel parallel-server2 cd ././tmp; rsync --server --sender -lDrRze.iLsf . ./parallel.file.'
|
-l parallel parallel-server2 cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newline1.out2
|
'newline1.out2
|
||||||
parallel@parallel-server2 (rm -f ./tmp/parallel.file.'
|
parallel@parallel-server2 (rm -f ./tmp/parallel.file.'
|
||||||
'newline1; rmdir ./tmp/ ./ 2>/dev/null;)
|
'newline1; rmdir ./tmp/ ./ 2>/dev/null;)
|
||||||
|
|
|
@ -1,21 +1,29 @@
|
||||||
### Test $PARALLEL - single line
|
### Test $PARALLEL - single line
|
||||||
1
|
1
|
||||||
ssh -l parallel -tt -oLogLevel=quiet parallel-server2 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 1;
|
|
||||||
1
|
1
|
||||||
ssh -tt -oLogLevel=quiet parallel\@parallel-server3 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 2;
|
1
|
||||||
2
|
centos3.tange.dk
|
||||||
|
hostname; echo 1
|
||||||
|
hostname; echo 1
|
||||||
|
nlv
|
||||||
### Test $PARALLEL - multi line
|
### Test $PARALLEL - multi line
|
||||||
ssh -l parallel -tt -oLogLevel=quiet parallel-server2 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 1;
|
|
||||||
1
|
1
|
||||||
ssh -tt -oLogLevel=quiet parallel\@parallel-server3 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 2;
|
1
|
||||||
2
|
centos3.tange.dk
|
||||||
|
hostname; echo 1
|
||||||
|
hostname; echo 1
|
||||||
|
nlv
|
||||||
### Test ~/.parallel/config - single line
|
### Test ~/.parallel/config - single line
|
||||||
ssh -l parallel -tt -oLogLevel=quiet parallel-server2 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 1;
|
|
||||||
1
|
1
|
||||||
ssh -tt -oLogLevel=quiet parallel\@parallel-server3 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 2;
|
1
|
||||||
2
|
centos3.tange.dk
|
||||||
|
hostname; echo 1
|
||||||
|
hostname; echo 1
|
||||||
|
nlv
|
||||||
### Test ~/.parallel/config - multi line
|
### Test ~/.parallel/config - multi line
|
||||||
ssh -l parallel -tt -oLogLevel=quiet parallel-server2 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 1;
|
|
||||||
1
|
1
|
||||||
ssh -tt -oLogLevel=quiet parallel\@parallel-server3 'eval `echo $SHELL | grep "/t\{0,1\}csh" > /dev/null && echo setenv PARALLEL_SEQ '$PARALLEL_SEQ'\; setenv PARALLEL_PID '$PARALLEL_PID' || echo PARALLEL_SEQ='$PARALLEL_SEQ'\;export PARALLEL_SEQ\; PARALLEL_PID='$PARALLEL_PID'\;export PARALLEL_PID` ;' tty\ \>/dev/null\ \&\&\ stty\ isig\ -onlcr\ -echo\;echo\ 2;
|
1
|
||||||
2
|
centos3.tange.dk
|
||||||
|
hostname; echo 1
|
||||||
|
hostname; echo 1
|
||||||
|
nlv
|
||||||
|
|
Loading…
Reference in a new issue