mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
Fixed bug #46787: --wd {= =} does not work.
This commit is contained in:
parent
f4c20c13b0
commit
a0716ab5fb
48
src/parallel
48
src/parallel
|
@ -1176,7 +1176,7 @@ sub check_invalid_option_combinations {
|
|||
|
||||
sub init_globals {
|
||||
# Defaults:
|
||||
$Global::version = 20160101;
|
||||
$Global::version = 20160102;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
@ -6567,6 +6567,36 @@ sub reset_failed {
|
|||
|
||||
sub reset_failed_here {
|
||||
# increase the number of times failed for this $sshlogin
|
||||
#
|
||||
# VGhlIGZpcnN0IGNvb2tpZSB3YXMgcmVsZWFzZWQgb24gMjAxMS0wMS0yNCBh
|
||||
# bmQgd2FzIHdvbiBieSBBRXZhcgpBcm5mam9yZCBCamFybWFzb24gb24gMjAx
|
||||
# MS0wNC0xMC4gVGhlIHNlY29uZCB3YXMgcmVsZWFzZWQgb24KMjAxMy0wOC0x
|
||||
# OCBhbmQgd29uIG9uIDIwMTUtMDctMTkgYnkgTWFyayBNYWltb25lLgoKRm9y
|
||||
# IHRoaXMgY29va2llIHlvdSBoYXZlIHRvIHVzZSBiYXNlNjQgdG8gZGVjb2Rl
|
||||
# LiBQbGVhc2UgZW1haWwKY29va2llQHRhbmdlLmRrIHdoZW4geW91IHJlYWQg
|
||||
# dGhpcy4KCkkgYW0gdGhlIG1haW50YWluZXIgb2YgYSBwaWVjZSBvZiBmcmVl
|
||||
# IHNvZnR3YXJlIGNhbGxlZCBHTlUKUGFyYWxsZWwuIEZyZWUgc29mdHdhcmUg
|
||||
# Z3VhcmFudGVlcyB5b3UgYWNjZXNzIHRvIHRoZSBzb3VyY2UKY29kZSwgYnV0
|
||||
# IEkgaGF2ZSBiZWVuIHdvbmRlcmluZyBob3cgbWFueSBhY3R1YWxseSBfcmVh
|
||||
# ZF8gdGhlCnNvdXJjZSBjb2RlLgoKVG8gdGVzdCB0aGlzIEkgcHV0IGluIGEg
|
||||
# Y29tbWVudCB0ZWxsaW5nIHBlb3BsZSB0byBlbWFpbCBtZSB3aGVuCnRoZXkg
|
||||
# cmVhZCB0aGlzLiBUaGUgY29tbWVudCB3YXMgcHV0IGluIGEgc2VjdGlvbiBv
|
||||
# ZiB0aGUgY29kZQp0aGF0IG5vIG9uZSB3b3VsZCBsb29rIHRvIGZpeCBvciBp
|
||||
# bXByb3ZlIHRoZSBzb2Z0d2FyZSAtIHNvIHRoZQpzb3VyY2UgY29kZSBlcXVp
|
||||
# dmFsZW50IHRvIGEgZHVzdHkgY29ybmVyLiBUbyBtYWtlIHN1cmUgdGhlCmNv
|
||||
# bW1lbnQgd291bGQgbm90IHNob3cgdXAgaWYgc29tZSBvbmUganVzdCBncmVw
|
||||
# cGVkIHRocm91Z2ggdGhlCnNvdXJjZSBjb2RlIEkgcm90MTMnZWQgdGhlIHNv
|
||||
# dXJjZSBjb2RlCmh0dHA6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvUk9UMTMK
|
||||
# CjIuNSBtb250aHMgbGF0ZXIgSSByZWNlaXZlZCBhbiBlbWFpbCBmcm9tIHNv
|
||||
# bWVvbmUgd2hvIG5vdCBvbmx5Cm1hbmFnZWQgdG8gZmluZCB0aGUgY29tbWVu
|
||||
# dCwgYnV0IGFsc28gbWFuYWdlZCB0byBndWVzcyB0aGUgY29kZQpoYWQgdG8g
|
||||
# YmUgcm90MTMnZWQuCgpUbyBzZWUgaWYgdGhpcyB3YXMgYSBmbHVrZSBldmVu
|
||||
# dCBJIHJldHJpZWQgdGhlIHRlc3QuIFRoaXMgdGltZSAKaXQgdG9vayBhIGxp
|
||||
# dHRsZSBsb25nZXIsIGJ1dCBhZnRlciAyMyBtb250aHMgaXQgdG9vIHdhcyBm
|
||||
# b3VuZC4KClRoaXMgYnJpbmdzIG1lIHRvIHRoZSBjb25jbHVzaW9uIHRoYXQg
|
||||
# dGhlcmUgX2FyZV8gcGVvcGxlLCB3aG8KYXJlIG5vdCBhZmZpbGlhdGVkIHdp
|
||||
# dGggdGhlIHByb2plY3QsIHRoYXQgd2lsbCByZWFkIHRoZSBzb3VyY2UKY29k
|
||||
# ZSAtIHRob3VnaCBpdCBtYXkgbm90IGhhcHBlbiBhbGwgdGhlIHRpbWUuCg==
|
||||
my $self = shift;
|
||||
delete $self->{'failed'}{$self->sshlogin()};
|
||||
}
|
||||
|
@ -7297,7 +7327,9 @@ sub workdir {
|
|||
$workdir = ".parallel/tmp/" . ::hostname() . "-" . $$
|
||||
. "-" . $self->seq();
|
||||
} else {
|
||||
$workdir = $opt::workdir;
|
||||
$workdir = $self->{'commandline'}->
|
||||
replace_placeholders([$opt::workdir],0,0);
|
||||
#$workdir = $opt::workdir;
|
||||
# Rsync treats /./ special. We dont want that
|
||||
$workdir =~ s:/\./:/:g; # Remove /./
|
||||
$workdir =~ s:(.)/+$:$1:; # Remove ending / if any
|
||||
|
@ -8687,7 +8719,8 @@ sub new {
|
|||
# by replacing {= and =} with \257< and \257>
|
||||
# in @command, --return and --tagstring (if used)
|
||||
for(@command,@$transfer_files,@$return_files,
|
||||
(defined $opt::tagstring ? $opt::tagstring : $dummy)) {
|
||||
(defined $opt::tagstring ? $opt::tagstring : $dummy),
|
||||
(defined $opt::workdir ? $opt::workdir : $dummy)) {
|
||||
# Disallow \257 to avoid nested {= {= =} =}
|
||||
if(/\257/) {
|
||||
::error("Command cannot contain the character \257. Use a function for that.");
|
||||
|
@ -8842,6 +8875,15 @@ sub replacement_counts_and_lengths {
|
|||
$replacecount{$1} ||= 1;
|
||||
}
|
||||
}
|
||||
if($opt::workdir) {
|
||||
my $t = $opt::workdir;
|
||||
while($t =~ s/ \257<([^\257]*)\257> //x) {
|
||||
# %replacecount = { "perlexpr" => number of times seen }
|
||||
# e.g { "$_++" => 2 }
|
||||
# But for workdir we just need to mark it as seen
|
||||
$replacecount{$1} ||= 1;
|
||||
}
|
||||
}
|
||||
if($opt::bar) {
|
||||
# If the command does not contain {} force it to be computed
|
||||
# as it is being used by --bar
|
||||
|
|
|
@ -275,7 +275,7 @@ You can map the bad limits using:
|
|||
tmux -S /tmp/p{%}-'{=3 $_="O"x$_ =}' new-session -d -n '{=1 $_="O"x$_ =}' true'\ {=2 $_="O"x$_ =};echo $?;rm /tmp/p{%}-O*'
|
||||
> value.csv 2>/dev/null
|
||||
|
||||
R -e 'a<-read.table("value.csv");X11();plot(a[,1],a[,2],col=a[,3]+5,cex=0.1);Sys.sleep(1000)'
|
||||
R -e 'a<-read.table("value.csv");X11();plot(a[,1],a[,2],col=a[,4]+5,cex=0.1);Sys.sleep(1000)'
|
||||
|
||||
For B<tmux 1.8> 17000 can be lowered to 2100.
|
||||
|
||||
|
|
|
@ -2146,7 +2146,7 @@
|
|||
|
||||
<p>With <b>--shebang</b> the <i>input_file</i> and <b>parallel</b> can be combined into the same script.</p>
|
||||
|
||||
<p>UNIX-scripts start with a shebang line like this:</p>
|
||||
<p>UNIX shell scripts start with a shebang line like this:</p>
|
||||
|
||||
<pre><code> #!/bin/bash</code></pre>
|
||||
|
||||
|
@ -2166,25 +2166,23 @@
|
|||
|
||||
<h2 id="Parallelizing-existing-scripts">Parallelizing existing scripts</h2>
|
||||
|
||||
<p>GNU <b>parallel</b> is often called as:</p>
|
||||
<p>GNU <b>parallel</b> is often called as this:</p>
|
||||
|
||||
<pre><code> cat input_file | parallel command
|
||||
parallel command ::: foo bar</code></pre>
|
||||
|
||||
<p>If command is a script <b>parallel</b> can be combined into a single file so:</p>
|
||||
<p>If <b>command</b> is a script, <b>parallel</b> can be combined into a single file so this will run the script in parallel:</p>
|
||||
|
||||
<pre><code> cat input_file | command
|
||||
command foo bar</code></pre>
|
||||
|
||||
<p>will run the script in <b>parallel</b>.</p>
|
||||
|
||||
<p>This <b>perl</b> script <b>perl_echo</b> works like <b>echo</b>:</p>
|
||||
|
||||
<pre><code> #!/usr/bin/perl
|
||||
|
||||
print "@ARGV\n"</code></pre>
|
||||
|
||||
<p>It can be called as:</p>
|
||||
<p>It can be called as this:</p>
|
||||
|
||||
<pre><code> parallel perl_echo ::: foo bar</code></pre>
|
||||
|
||||
|
@ -2210,69 +2208,136 @@
|
|||
<dt id="Perl">Perl:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/perl</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/perl
|
||||
|
||||
<p>print "Arguments @ARGV\n";</p>
|
||||
print "Arguments @ARGV\n";</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Python">Python:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/python</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/python
|
||||
|
||||
<p>import sys</p>
|
||||
|
||||
<p>print 'Arguments', str(sys.argv)</p>
|
||||
import sys
|
||||
print 'Arguments', str(sys.argv)</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Bash">Bash:</dt>
|
||||
<dt id="Bash-sh-zsh-Korn-shell">Bash/sh/zsh/Korn shell:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /bin/bash</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /bin/bash
|
||||
|
||||
<p>echo Arguments "$@"</p>
|
||||
echo Arguments "$@"</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="csh">csh:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /bin/csh
|
||||
|
||||
echo Arguments "$argv"</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Tcl">Tcl:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/tclsh
|
||||
|
||||
puts "Arguments $argv"</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="R">R:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
|
||||
|
||||
<p>args <- commandArgs(trailingOnly = TRUE) print(paste("Arguments ",args))</p>
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
print(paste("Arguments ",args))</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="GNUplot">GNUplot:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
|
||||
|
||||
<p>print "Arguments ", system('echo $ARG')</p>
|
||||
print "Arguments ", system('echo $ARG')</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Ruby">Ruby:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
|
||||
|
||||
<p>print "Arguments " puts ARGV</p>
|
||||
print "Arguments "
|
||||
puts ARGV</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Octave">Octave:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/octave</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/octave
|
||||
|
||||
<p>printf ("Arguments"); arg_list = argv (); for i = 1:nargin printf (" %s", arg_list{i}); endfor printf ("\n");</p>
|
||||
printf ("Arguments");
|
||||
arg_list = argv ();
|
||||
for i = 1:nargin
|
||||
printf (" %s", arg_list{i});
|
||||
endfor
|
||||
printf ("\n");</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Common-LISP">Common LISP:</dt>
|
||||
<dd>
|
||||
|
||||
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp</p>
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
|
||||
|
||||
<p>(format t "~&~S~&" 'Arguments) (format t "~&~S~&" *args*)</p>
|
||||
(format t "~&~S~&" 'Arguments)
|
||||
(format t "~&~S~&" *args*)</code></pre>
|
||||
|
||||
<p>LUA PHP Javascript nodejs Tcl C#?</p>
|
||||
</dd>
|
||||
<dt id="PHP">PHP:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/php
|
||||
<?php
|
||||
echo "Arguments";
|
||||
foreach(array_slice($argv,1) as $v)
|
||||
{
|
||||
echo " $v";
|
||||
}
|
||||
echo "\n";
|
||||
?></code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="Node.js">Node.js:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/node
|
||||
|
||||
var myArgs = process.argv.slice(2);
|
||||
console.log('Arguments ', myArgs);</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="LUA">LUA:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/lua
|
||||
|
||||
io.write "Arguments"
|
||||
for a = 1, #arg do
|
||||
io.write(" ")
|
||||
io.write(arg[a])
|
||||
end
|
||||
print("")</code></pre>
|
||||
|
||||
</dd>
|
||||
<dt id="C">C#:</dt>
|
||||
<dd>
|
||||
|
||||
<pre><code> #!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
|
||||
|
||||
var argv = Environment.GetEnvironmentVariable("ARGV");
|
||||
print("Arguments "+argv);
|
||||
</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
@ -2177,7 +2177,7 @@ GNU B<parallel> is often called as this:
|
|||
|
||||
With B<--shebang> the I<input_file> and B<parallel> can be combined into the same script.
|
||||
|
||||
UNIX-scripts start with a shebang line like this:
|
||||
UNIX shell scripts start with a shebang line like this:
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
|
@ -2199,25 +2199,24 @@ Output (the order may be different):
|
|||
|
||||
=head2 Parallelizing existing scripts
|
||||
|
||||
GNU B<parallel> is often called as:
|
||||
GNU B<parallel> is often called as this:
|
||||
|
||||
cat input_file | parallel command
|
||||
parallel command ::: foo bar
|
||||
|
||||
If command is a script B<parallel> can be combined into a single file so:
|
||||
If B<command> is a script, B<parallel> can be combined into a single
|
||||
file so this will run the script in parallel:
|
||||
|
||||
cat input_file | command
|
||||
command foo bar
|
||||
|
||||
will run the script in B<parallel>.
|
||||
|
||||
This B<perl> script B<perl_echo> works like B<echo>:
|
||||
|
||||
#!/usr/bin/perl
|
||||
|
||||
print "@ARGV\n"
|
||||
|
||||
It can be called as:
|
||||
It can be called as this:
|
||||
|
||||
parallel perl_echo ::: foo bar
|
||||
|
||||
|
@ -2242,74 +2241,117 @@ This technique can be used for:
|
|||
|
||||
=item Perl:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/perl
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/perl
|
||||
|
||||
print "Arguments @ARGV\n";
|
||||
print "Arguments @ARGV\n";
|
||||
|
||||
|
||||
=item Python:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/python
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/python
|
||||
|
||||
import sys
|
||||
|
||||
print 'Arguments', str(sys.argv)
|
||||
import sys
|
||||
print 'Arguments', str(sys.argv)
|
||||
|
||||
|
||||
=item Bash:
|
||||
=item Bash/sh/zsh/Korn shell:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /bin/bash
|
||||
#!/usr/bin/parallel --shebang-wrap /bin/bash
|
||||
|
||||
echo Arguments "$@"
|
||||
echo Arguments "$@"
|
||||
|
||||
|
||||
=item csh:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /bin/csh
|
||||
|
||||
echo Arguments "$argv"
|
||||
|
||||
|
||||
=item Tcl:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/tclsh
|
||||
|
||||
puts "Arguments $argv"
|
||||
|
||||
|
||||
=item R:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
|
||||
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
print(paste("Arguments ",args))
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
print(paste("Arguments ",args))
|
||||
|
||||
|
||||
=item GNUplot:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
|
||||
#!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
|
||||
|
||||
print "Arguments ", system('echo $ARG')
|
||||
print "Arguments ", system('echo $ARG')
|
||||
|
||||
|
||||
=item Ruby:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
|
||||
|
||||
print "Arguments "
|
||||
puts ARGV
|
||||
print "Arguments "
|
||||
puts ARGV
|
||||
|
||||
|
||||
=item Octave:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/octave
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/octave
|
||||
|
||||
printf ("Arguments");
|
||||
arg_list = argv ();
|
||||
for i = 1:nargin
|
||||
printf (" %s", arg_list{i});
|
||||
endfor
|
||||
printf ("\n");
|
||||
printf ("Arguments");
|
||||
arg_list = argv ();
|
||||
for i = 1:nargin
|
||||
printf (" %s", arg_list{i});
|
||||
endfor
|
||||
printf ("\n");
|
||||
|
||||
=item Common LISP:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
|
||||
|
||||
(format t "~&~S~&" 'Arguments)
|
||||
(format t "~&~S~&" *args*)
|
||||
(format t "~&~S~&" 'Arguments)
|
||||
(format t "~&~S~&" *args*)
|
||||
|
||||
LUA
|
||||
PHP
|
||||
Javascript
|
||||
nodejs
|
||||
Tcl
|
||||
C#?
|
||||
=item PHP:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/php
|
||||
<?php
|
||||
echo "Arguments";
|
||||
foreach(array_slice($argv,1) as $v)
|
||||
{
|
||||
echo " $v";
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
|
||||
=item Node.js:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/node
|
||||
|
||||
var myArgs = process.argv.slice(2);
|
||||
console.log('Arguments ', myArgs);
|
||||
|
||||
=item LUA:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/lua
|
||||
|
||||
io.write "Arguments"
|
||||
for a = 1, #arg do
|
||||
io.write(" ")
|
||||
io.write(arg[a])
|
||||
end
|
||||
print("")
|
||||
|
||||
=item C#:
|
||||
|
||||
#!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
|
||||
|
||||
var argv = Environment.GetEnvironmentVariable("ARGV");
|
||||
print("Arguments "+argv);
|
||||
|
||||
|
||||
=back
|
||||
|
|
|
@ -38,6 +38,10 @@ prereqlocal: installparallel
|
|||
niceload true || (echo niceload is required for testsuite; /bin/false)
|
||||
which burnP6 || (echo burnP6 is required for testsuite; /bin/false)
|
||||
which timeout || (echo timeout is required for testsuite; /bin/false)
|
||||
which autossh || (echo autossh is required for testsuite; /bin/false)
|
||||
which lsh || (echo lsh is required for testsuite; /bin/false)
|
||||
timeout 10 ssh sh@lo true || (echo ssh sh@lo is required for testsuite; /bin/false)
|
||||
timeout 5 ssh csh@lo true || (echo ssh csh@lo is required for testsuite; /bin/false)
|
||||
|
||||
prereqremote: installparallel startvm
|
||||
parallel --timeout 10 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)
|
||||
|
|
|
@ -253,7 +253,7 @@ echo '{##} bug #45841: Replacement string for total no of jobs'
|
|||
parallel -k 'echo {= $::G++ > 3 and ($_=$Global::JobQueue->total_jobs());=}' ::: {1..10}
|
||||
parallel -k -N7 --plus echo {#} {##} ::: {1..14}
|
||||
parallel -k -N7 --plus echo {#} {##} ::: {1..15}
|
||||
parallel -k -X --plus echo {#} {##} ::: {1..15}
|
||||
parallel -k -S 8/: -X --plus echo {#} {##} ::: {1..15}
|
||||
|
||||
echo '**'
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ echo '### --ssh lsh'
|
|||
# Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler
|
||||
|
||||
echo '### bug #45025: --pipe --retries does not reschedule on other host'
|
||||
seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname'
|
||||
seq 1 300030| stdout parallel -k --retries 2 -S a.a,: --pipe 'wc;hostname' | perl -pe 's/'`hostname`'/localhost-:/'
|
||||
stdout parallel --retries 2 --roundrobin echo ::: should fail
|
||||
|
||||
EOF
|
||||
|
|
|
@ -68,4 +68,17 @@ echo '### Test --wd .';
|
|||
ssh $SSHLOGIN2 mkdir -p mydir;
|
||||
mkdir -p $HOME/mydir; cd $HOME/mydir;
|
||||
parallel --workdir . -S $SSHLOGIN2 ::: pwd
|
||||
|
||||
echo '### Test --wd {}';
|
||||
ssh $SSHLOGIN2 rm -rf wd1 wd2;
|
||||
mkdir -p $HOME/mydir; cd $HOME/mydir;
|
||||
parallel --workdir {} -S $SSHLOGIN2 touch ::: wd1 wd2;
|
||||
ssh $SSHLOGIN2 ls -d wd1 wd2
|
||||
|
||||
echo '### Test --wd {= =}';
|
||||
ssh $SSHLOGIN2 rm -rf WD1 WD2;
|
||||
mkdir -p $HOME/mydir; cd $HOME/mydir;
|
||||
parallel --workdir '{= $_=uc($_) =}' -S $SSHLOGIN2 touch ::: wd1 wd2;
|
||||
ssh $SSHLOGIN2 ls -d WD1 WD2
|
||||
|
||||
EOF
|
||||
|
|
301
testsuite/wanted-results/parallel-local-sql
Normal file
301
testsuite/wanted-results/parallel-local-sql
Normal file
|
@ -0,0 +1,301 @@
|
|||
echo '### --sqlandworker mysql'
|
||||
### --sqlandworker mysql
|
||||
(sleep 2; parallel --sqlworker $MYSQLTBL sleep .3\;echo >$T1) &
|
||||
parallel --sqlandworker $MYSQLTBL sleep .3\;echo ::: {1..5} ::: {a..e} >$T2; true sort -u $T1 $T2; sql $MYSQL 'select * from parsql order by seq;'
|
||||
Seq Host Starttime JobRuntime Send Receive Exitval _Signal Command V1 V2 Stdout Stderr
|
||||
1 :999999NULL 4 0 0 sleep .3;echo 1 a 1 a 1 a\n
|
||||
2 :999999NULL 4 0 0 sleep .3;echo 1 b 1 b 1 b\n
|
||||
3 :999999NULL 4 0 0 sleep .3;echo 1 c 1 c 1 c\n
|
||||
4 :999999NULL 4 0 0 sleep .3;echo 1 d 1 d 1 d\n
|
||||
5 :999999NULL 4 0 0 sleep .3;echo 1 e 1 e 1 e\n
|
||||
6 :999999NULL 4 0 0 sleep .3;echo 2 a 2 a 2 a\n
|
||||
7 :999999NULL 4 0 0 sleep .3;echo 2 b 2 b 2 b\n
|
||||
8 :999999NULL 4 0 0 sleep .3;echo 2 c 2 c 2 c\n
|
||||
9 :999999NULL 4 0 0 sleep .3;echo 2 d 2 d 2 d\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 2 e 2 e 2 e\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 3 a 3 a 3 a\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 3 b 3 b 3 b\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 3 c 3 c 3 c\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 3 d 3 d 3 d\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 3 e 3 e 3 e\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 4 a 4 a 4 a\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 4 b 4 b 4 b\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 4 c 4 c 4 c\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 4 d 4 d 4 d\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 4 e 4 e 4 e\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 5 a 5 a 5 a\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 5 b 5 b 5 b\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 5 c 5 c 5 c\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 5 d 5 d 5 d\n
|
||||
999:999999NULL 4 0 0 sleep .3;echo 5 e 5 e 5 e\n
|
||||
echo '### --sqlandworker postgresql'
|
||||
### --sqlandworker postgresql
|
||||
(sleep 2; parallel --sqlworker $PGTBL sleep .3\;echo >$T3) &
|
||||
parallel --sqlandworker $PGTBL sleep .3\;echo ::: {1..5} ::: {a..e} >$T4; true sort -u $T3 $T4; sql $PG 'select * from parsql order by seq;'
|
||||
seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
|
||||
-----+------+-------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
|
||||
1 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | 1 a +|
|
||||
| | | | | | | | | | | |
|
||||
2 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | 1 b +|
|
||||
| | | | | | | | | | | |
|
||||
3 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | 1 c +|
|
||||
| | | | | | | | | | | |
|
||||
4 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | 1 d +|
|
||||
| | | | | | | | | | | |
|
||||
5 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | 1 e +|
|
||||
| | | | | | | | | | | |
|
||||
6 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | 2 a +|
|
||||
| | | | | | | | | | | |
|
||||
7 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | 2 b +|
|
||||
| | | | | | | | | | | |
|
||||
8 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | 2 c +|
|
||||
| | | | | | | | | | | |
|
||||
9 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | 2 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | 2 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | 3 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | 3 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | 3 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | 3 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | 3 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | 4 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | 4 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | 4 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | 4 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | 4 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | 5 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | 5 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | 5 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | 5 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | 5 e +|
|
||||
| | | | | | | | | | | |
|
||||
(999rows)
|
||||
|
||||
echo '### --sqlandworker sqlite'
|
||||
### --sqlandworker sqlite
|
||||
(sleep 2; parallel --sqlworker $SQLITETBL sleep .3\;echo >$T5) &
|
||||
parallel --sqlandworker $SQLITETBL sleep .3\;echo ::: {1..5} ::: {a..e} >$T6; true sort -u $T5 $T6; sql $SQLITE 'select * from parsql order by seq;'
|
||||
Seq|Host|Starttime|JobRuntime|Send|Receive|Exitval|_Signal|Command|V1|V2|Stdout|Stderr
|
||||
1|:|999|999||4|0|0|sleep .3;echo 1 a|1|a|1 a
|
||||
|
|
||||
2|:|999|999||4|0|0|sleep .3;echo 1 b|1|b|1 b
|
||||
|
|
||||
3|:|999|999||4|0|0|sleep .3;echo 1 c|1|c|1 c
|
||||
|
|
||||
4|:|999|999||4|0|0|sleep .3;echo 1 d|1|d|1 d
|
||||
|
|
||||
5|:|999|999||4|0|0|sleep .3;echo 1 e|1|e|1 e
|
||||
|
|
||||
6|:|999|999||4|0|0|sleep .3;echo 2 a|2|a|2 a
|
||||
|
|
||||
7|:|999|999||4|0|0|sleep .3;echo 2 b|2|b|2 b
|
||||
|
|
||||
8|:|999|999||4|0|0|sleep .3;echo 2 c|2|c|2 c
|
||||
|
|
||||
9|:|999|999||4|0|0|sleep .3;echo 2 d|2|d|2 d
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 2 e|2|e|2 e
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 3 a|3|a|3 a
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 3 b|3|b|3 b
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 3 c|3|c|3 c
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 3 d|3|d|3 d
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 3 e|3|e|3 e
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 4 a|4|a|4 a
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 4 b|4|b|4 b
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 4 c|4|c|4 c
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 4 d|4|d|4 d
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 4 e|4|e|4 e
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 5 a|5|a|5 a
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 5 b|5|b|5 b
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 5 c|5|c|5 c
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 5 d|5|d|5 d
|
||||
|
|
||||
999|:|999|999||4|0|0|sleep .3;echo 5 e|5|e|5 e
|
||||
|
|
||||
echo '### --sqlandworker postgresql -S lo'
|
||||
### --sqlandworker postgresql -S lo
|
||||
(sleep 2; parallel -S lo --sqlworker $PGTBL2 sleep .3\;echo >$T7) &
|
||||
parallel -S lo --sqlandworker $PGTBL2 sleep .3\;echo ::: {1..5} ::: {a..e} >$T8; true sort -u $T7 $T8; sql $PG 'select * from parsql2 order by seq;'
|
||||
seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
|
||||
-----+------+-------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
|
||||
1 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | 1 a +|
|
||||
| | | | | | | | | | | |
|
||||
2 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | 1 b +|
|
||||
| | | | | | | | | | | |
|
||||
3 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | 1 c +|
|
||||
| | | | | | | | | | | |
|
||||
4 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | 1 d +|
|
||||
| | | | | | | | | | | |
|
||||
5 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | 1 e +|
|
||||
| | | | | | | | | | | |
|
||||
6 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | 2 a +|
|
||||
| | | | | | | | | | | |
|
||||
7 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | 2 b +|
|
||||
| | | | | | | | | | | |
|
||||
8 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | 2 c +|
|
||||
| | | | | | | | | | | |
|
||||
9 | lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | 2 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | 2 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | 3 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | 3 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | 3 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | 3 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | 3 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | 4 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | 4 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | 4 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | 4 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | 4 e +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | 5 a +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | 5 b +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | 5 c +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | 5 d +|
|
||||
| | | | | | | | | | | |
|
||||
999| lo |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | 5 e +|
|
||||
| | | | | | | | | | | |
|
||||
(999rows)
|
||||
|
||||
echo '### --sqlandworker postgresql --results'
|
||||
### --sqlandworker postgresql --results
|
||||
mkdir -p /tmp/out--sql
|
||||
(sleep 2; parallel --results /tmp/out--sql --sqlworker $PGTBL3 sleep .3\;echo >$T9) &
|
||||
parallel --results /tmp/out--sql --sqlandworker $PGTBL3 sleep .3\;echo ::: {1..5} ::: {a..e} >$T999; true sort -u $T9 $T999; sql $PG 'select * from parsql3 order by seq;'
|
||||
seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
|
||||
-----+------+-------------+------------+------+---------+---------+---------+-------------------+----+----+------------------------------+------------------------------
|
||||
1 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | /tmp/out--sql/1/1/2/a/stdout | /tmp/out--sql/1/1/2/a/stderr
|
||||
2 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | /tmp/out--sql/1/1/2/b/stdout | /tmp/out--sql/1/1/2/b/stderr
|
||||
3 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | /tmp/out--sql/1/1/2/c/stdout | /tmp/out--sql/1/1/2/c/stderr
|
||||
4 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | /tmp/out--sql/1/1/2/d/stdout | /tmp/out--sql/1/1/2/d/stderr
|
||||
5 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | /tmp/out--sql/1/1/2/e/stdout | /tmp/out--sql/1/1/2/e/stderr
|
||||
6 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | /tmp/out--sql/1/2/2/a/stdout | /tmp/out--sql/1/2/2/a/stderr
|
||||
7 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | /tmp/out--sql/1/2/2/b/stdout | /tmp/out--sql/1/2/2/b/stderr
|
||||
8 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | /tmp/out--sql/1/2/2/c/stdout | /tmp/out--sql/1/2/2/c/stderr
|
||||
9 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | /tmp/out--sql/1/2/2/d/stdout | /tmp/out--sql/1/2/2/d/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | /tmp/out--sql/1/2/2/e/stdout | /tmp/out--sql/1/2/2/e/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | /tmp/out--sql/1/3/2/a/stdout | /tmp/out--sql/1/3/2/a/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | /tmp/out--sql/1/3/2/b/stdout | /tmp/out--sql/1/3/2/b/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | /tmp/out--sql/1/3/2/c/stdout | /tmp/out--sql/1/3/2/c/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | /tmp/out--sql/1/3/2/d/stdout | /tmp/out--sql/1/3/2/d/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | /tmp/out--sql/1/3/2/e/stdout | /tmp/out--sql/1/3/2/e/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | /tmp/out--sql/1/4/2/a/stdout | /tmp/out--sql/1/4/2/a/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | /tmp/out--sql/1/4/2/b/stdout | /tmp/out--sql/1/4/2/b/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | /tmp/out--sql/1/4/2/c/stdout | /tmp/out--sql/1/4/2/c/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | /tmp/out--sql/1/4/2/d/stdout | /tmp/out--sql/1/4/2/d/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | /tmp/out--sql/1/4/2/e/stdout | /tmp/out--sql/1/4/2/e/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | /tmp/out--sql/1/5/2/a/stdout | /tmp/out--sql/1/5/2/a/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | /tmp/out--sql/1/5/2/b/stdout | /tmp/out--sql/1/5/2/b/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | /tmp/out--sql/1/5/2/c/stdout | /tmp/out--sql/1/5/2/c/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | /tmp/out--sql/1/5/2/d/stdout | /tmp/out--sql/1/5/2/d/stderr
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | /tmp/out--sql/1/5/2/e/stdout | /tmp/out--sql/1/5/2/e/stderr
|
||||
(999rows)
|
||||
|
||||
echo '### --sqlandworker postgresql --linebuffer'
|
||||
### --sqlandworker postgresql --linebuffer
|
||||
(sleep 2; parallel --linebuffer --sqlworker $PGTBL4 sleep .3\;echo >$T999) &
|
||||
parallel --linebuffer --sqlandworker $PGTBL4 sleep .3\;echo ::: {1..5} ::: {a..e} >$T999; true sort -u $T999$T999; sql $PG 'select * from parsql4 order by seq;'
|
||||
seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
|
||||
-----+------+-------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
|
||||
1 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | |
|
||||
2 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | |
|
||||
3 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | |
|
||||
4 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | |
|
||||
5 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | |
|
||||
6 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | |
|
||||
7 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | |
|
||||
8 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | |
|
||||
9 | : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | |
|
||||
999| : |999e+999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | |
|
||||
(999rows)
|
||||
|
||||
echo '### --sqlandworker postgresql -u'
|
||||
### --sqlandworker postgresql -u
|
||||
(sleep 2; parallel -u --sqlworker $PGTBL5 sleep .3\;echo >$T999) &
|
||||
parallel -u --sqlandworker $PGTBL5 sleep .3\;echo ::: {1..5} ::: {a..e} >$T999; true sort -u $T999$T999; sql $PG 'select * from parsql5 order by seq;'
|
||||
seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
|
||||
-----+------+-------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
|
||||
1 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 1 a | 1 | a | |
|
||||
2 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 1 b | 1 | b | |
|
||||
3 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 1 c | 1 | c | |
|
||||
4 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 1 d | 1 | d | |
|
||||
5 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 1 e | 1 | e | |
|
||||
6 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 2 a | 2 | a | |
|
||||
7 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 2 b | 2 | b | |
|
||||
8 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 2 c | 2 | c | |
|
||||
9 | : |999e+999|999| | | 0 | 0 | sleep .3;echo 2 d | 2 | d | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 2 e | 2 | e | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 3 a | 3 | a | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 3 b | 3 | b | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 3 c | 3 | c | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 3 d | 3 | d | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 3 e | 3 | e | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 4 a | 4 | a | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 4 b | 4 | b | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 4 c | 4 | c | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 4 d | 4 | d | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 4 e | 4 | e | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 5 a | 5 | a | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 5 b | 5 | b | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 5 c | 5 | c | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 5 d | 5 | d | |
|
||||
999| : |999e+999|999| | | 0 | 0 | sleep .3;echo 5 e | 5 | e | |
|
||||
(999rows)
|
||||
|
|
@ -106,3 +106,11 @@ echo '### Test --workdir .'; ssh parallel@lo mkdir -p mydir; mkdir -p $HOME/
|
|||
echo '### Test --wd .'; ssh csh@lo mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S csh@lo ::: pwd
|
||||
### Test --wd .
|
||||
/home/csh/mydir
|
||||
echo '### Test --wd {}'; ssh csh@lo rm -rf wd1 wd2; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir {} -S csh@lo touch ::: wd1 wd2; ssh csh@lo ls -d wd1 wd2
|
||||
### Test --wd {}
|
||||
wd1
|
||||
wd2
|
||||
echo '### Test --wd {= =}'; ssh csh@lo rm -rf WD1 WD2; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir '{= $_=uc($_) =}' -S csh@lo touch ::: wd1 wd2; ssh csh@lo ls -d WD1 WD2
|
||||
### Test --wd {= =}
|
||||
WD1
|
||||
WD2
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue