Fixed bug #46787: --wd {= =} does not work.

This commit is contained in:
Ole Tange 2016-01-04 00:33:09 +01:00
parent f4c20c13b0
commit a0716ab5fb
11 changed files with 558 additions and 83 deletions

View file

@ -1176,7 +1176,7 @@ sub check_invalid_option_combinations {
sub init_globals { sub init_globals {
# Defaults: # Defaults:
$Global::version = 20160101; $Global::version = 20160102;
$Global::progname = 'parallel'; $Global::progname = 'parallel';
$Global::infinity = 2**31; $Global::infinity = 2**31;
$Global::debug = 0; $Global::debug = 0;
@ -6567,6 +6567,36 @@ sub reset_failed {
sub reset_failed_here { sub reset_failed_here {
# increase the number of times failed for this $sshlogin # 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; my $self = shift;
delete $self->{'failed'}{$self->sshlogin()}; delete $self->{'failed'}{$self->sshlogin()};
} }
@ -7297,7 +7327,9 @@ sub workdir {
$workdir = ".parallel/tmp/" . ::hostname() . "-" . $$ $workdir = ".parallel/tmp/" . ::hostname() . "-" . $$
. "-" . $self->seq(); . "-" . $self->seq();
} else { } else {
$workdir = $opt::workdir; $workdir = $self->{'commandline'}->
replace_placeholders([$opt::workdir],0,0);
#$workdir = $opt::workdir;
# Rsync treats /./ special. We dont want that # Rsync treats /./ special. We dont want that
$workdir =~ s:/\./:/:g; # Remove /./ $workdir =~ s:/\./:/:g; # Remove /./
$workdir =~ s:(.)/+$:$1:; # Remove ending / if any $workdir =~ s:(.)/+$:$1:; # Remove ending / if any
@ -8687,7 +8719,8 @@ sub new {
# by replacing {= and =} with \257< and \257> # by replacing {= and =} with \257< and \257>
# in @command, --return and --tagstring (if used) # in @command, --return and --tagstring (if used)
for(@command,@$transfer_files,@$return_files, 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 {= {= =} =} # Disallow \257 to avoid nested {= {= =} =}
if(/\257/) { if(/\257/) {
::error("Command cannot contain the character \257. Use a function for that."); ::error("Command cannot contain the character \257. Use a function for that.");
@ -8842,6 +8875,15 @@ sub replacement_counts_and_lengths {
$replacecount{$1} ||= 1; $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($opt::bar) {
# If the command does not contain {} force it to be computed # If the command does not contain {} force it to be computed
# as it is being used by --bar # as it is being used by --bar

View file

@ -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*' 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 > 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. For B<tmux 1.8> 17000 can be lowered to 2100.

View file

@ -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>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> <pre><code> #!/bin/bash</code></pre>
@ -2166,25 +2166,23 @@
<h2 id="Parallelizing-existing-scripts">Parallelizing existing scripts</h2> <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 <pre><code> cat input_file | parallel command
parallel command ::: foo bar</code></pre> 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 <pre><code> cat input_file | command
command foo bar</code></pre> 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> <p>This <b>perl</b> script <b>perl_echo</b> works like <b>echo</b>:</p>
<pre><code> #!/usr/bin/perl <pre><code> #!/usr/bin/perl
print &quot;@ARGV\n&quot;</code></pre> print &quot;@ARGV\n&quot;</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> <pre><code> parallel perl_echo ::: foo bar</code></pre>
@ -2210,69 +2208,136 @@
<dt id="Perl">Perl:</dt> <dt id="Perl">Perl:</dt>
<dd> <dd>
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/perl</p> <pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/perl
<p>print &quot;Arguments @ARGV\n&quot;;</p> print &quot;Arguments @ARGV\n&quot;;</code></pre>
</dd> </dd>
<dt id="Python">Python:</dt> <dt id="Python">Python:</dt>
<dd> <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> import sys
print &#39;Arguments&#39;, str(sys.argv)</code></pre>
<p>print &#39;Arguments&#39;, str(sys.argv)</p>
</dd> </dd>
<dt id="Bash">Bash:</dt> <dt id="Bash-sh-zsh-Korn-shell">Bash/sh/zsh/Korn shell:</dt>
<dd> <dd>
<p>#!/usr/bin/parallel --shebang-wrap /bin/bash</p> <pre><code> #!/usr/bin/parallel --shebang-wrap /bin/bash
<p>echo Arguments &quot;$@&quot;</p> echo Arguments &quot;$@&quot;</code></pre>
</dd>
<dt id="csh">csh:</dt>
<dd>
<pre><code> #!/usr/bin/parallel --shebang-wrap /bin/csh
echo Arguments &quot;$argv&quot;</code></pre>
</dd>
<dt id="Tcl">Tcl:</dt>
<dd>
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/tclsh
puts &quot;Arguments $argv&quot;</code></pre>
</dd> </dd>
<dt id="R">R:</dt> <dt id="R">R:</dt>
<dd> <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 &lt;- commandArgs(trailingOnly = TRUE) print(paste(&quot;Arguments &quot;,args))</p> args &lt;- commandArgs(trailingOnly = TRUE)
print(paste(&quot;Arguments &quot;,args))</code></pre>
</dd> </dd>
<dt id="GNUplot">GNUplot:</dt> <dt id="GNUplot">GNUplot:</dt>
<dd> <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 &quot;Arguments &quot;, system(&#39;echo $ARG&#39;)</p> print &quot;Arguments &quot;, system(&#39;echo $ARG&#39;)</code></pre>
</dd> </dd>
<dt id="Ruby">Ruby:</dt> <dt id="Ruby">Ruby:</dt>
<dd> <dd>
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby</p> <pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
<p>print &quot;Arguments &quot; puts ARGV</p> print &quot;Arguments &quot;
puts ARGV</code></pre>
</dd> </dd>
<dt id="Octave">Octave:</dt> <dt id="Octave">Octave:</dt>
<dd> <dd>
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/octave</p> <pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/octave
<p>printf (&quot;Arguments&quot;); arg_list = argv (); for i = 1:nargin printf (&quot; %s&quot;, arg_list{i}); endfor printf (&quot;\n&quot;);</p> printf (&quot;Arguments&quot;);
arg_list = argv ();
for i = 1:nargin
printf (&quot; %s&quot;, arg_list{i});
endfor
printf (&quot;\n&quot;);</code></pre>
</dd> </dd>
<dt id="Common-LISP">Common LISP:</dt> <dt id="Common-LISP">Common LISP:</dt>
<dd> <dd>
<p>#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp</p> <pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
<p>(format t &quot;~&amp;~S~&amp;&quot; &#39;Arguments) (format t &quot;~&amp;~S~&amp;&quot; *args*)</p> (format t &quot;~&amp;~S~&amp;&quot; &#39;Arguments)
(format t &quot;~&amp;~S~&amp;&quot; *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
&lt;?php
echo &quot;Arguments&quot;;
foreach(array_slice($argv,1) as $v)
{
echo &quot; $v&quot;;
}
echo &quot;\n&quot;;
?&gt;</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(&#39;Arguments &#39;, myArgs);</code></pre>
</dd>
<dt id="LUA">LUA:</dt>
<dd>
<pre><code> #!/usr/bin/parallel --shebang-wrap /usr/bin/lua
io.write &quot;Arguments&quot;
for a = 1, #arg do
io.write(&quot; &quot;)
io.write(arg[a])
end
print(&quot;&quot;)</code></pre>
</dd>
<dt id="C">C#:</dt>
<dd>
<pre><code> #!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
var argv = Environment.GetEnvironmentVariable(&quot;ARGV&quot;);
print(&quot;Arguments &quot;+argv);
</code></pre>
</dd> </dd>
</dl> </dl>

View file

@ -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. 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 #!/bin/bash
@ -2199,25 +2199,24 @@ Output (the order may be different):
=head2 Parallelizing existing scripts =head2 Parallelizing existing scripts
GNU B<parallel> is often called as: GNU B<parallel> is often called as this:
cat input_file | parallel command cat input_file | parallel command
parallel command ::: foo bar 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 cat input_file | command
command foo bar command foo bar
will run the script in B<parallel>.
This B<perl> script B<perl_echo> works like B<echo>: This B<perl> script B<perl_echo> works like B<echo>:
#!/usr/bin/perl #!/usr/bin/perl
print "@ARGV\n" print "@ARGV\n"
It can be called as: It can be called as this:
parallel perl_echo ::: foo bar parallel perl_echo ::: foo bar
@ -2252,17 +2251,30 @@ print "Arguments @ARGV\n";
#!/usr/bin/parallel --shebang-wrap /usr/bin/python #!/usr/bin/parallel --shebang-wrap /usr/bin/python
import sys import sys
print 'Arguments', str(sys.argv) 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: =item R:
#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave #!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
@ -2304,12 +2316,42 @@ printf ("\n");
(format t "~&~S~&" 'Arguments) (format t "~&~S~&" 'Arguments)
(format t "~&~S~&" *args*) (format t "~&~S~&" *args*)
LUA =item PHP:
PHP
Javascript #!/usr/bin/parallel --shebang-wrap /usr/bin/php
nodejs <?php
Tcl echo "Arguments";
C#? 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 =back

View file

@ -38,6 +38,10 @@ prereqlocal: installparallel
niceload true || (echo niceload is required for testsuite; /bin/false) niceload true || (echo niceload is required for testsuite; /bin/false)
which burnP6 || (echo burnP6 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 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 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) parallel --timeout 10 --tag ssh parallel@parallel-server{} parallel --minversion 20121021 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/true)

View file

@ -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 'echo {= $::G++ > 3 and ($_=$Global::JobQueue->total_jobs());=}' ::: {1..10}
parallel -k -N7 --plus echo {#} {##} ::: {1..14} parallel -k -N7 --plus echo {#} {##} ::: {1..14}
parallel -k -N7 --plus echo {#} {##} ::: {1..15} parallel -k -N7 --plus echo {#} {##} ::: {1..15}
parallel -k -X --plus echo {#} {##} ::: {1..15} parallel -k -S 8/: -X --plus echo {#} {##} ::: {1..15}
echo '**' echo '**'

View file

@ -29,7 +29,7 @@ echo '### --ssh lsh'
# Test gl. parallel med --ssh lsh: Hvilke fejler? brug dem. Også hvis de fejler # 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' 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 stdout parallel --retries 2 --roundrobin echo ::: should fail
EOF EOF

View file

@ -68,4 +68,17 @@ echo '### Test --wd .';
ssh $SSHLOGIN2 mkdir -p mydir; ssh $SSHLOGIN2 mkdir -p mydir;
mkdir -p $HOME/mydir; cd $HOME/mydir; mkdir -p $HOME/mydir; cd $HOME/mydir;
parallel --workdir . -S $SSHLOGIN2 ::: pwd 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 EOF

View 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)

View file

@ -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 echo '### Test --wd .'; ssh csh@lo mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S csh@lo ::: pwd
### Test --wd . ### Test --wd .
/home/csh/mydir /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