Fixed bug #47462: --transfer with file containing /./ is not done relative.

Added env_parallel to Makefile.
--sql => --sqlmaster.
ssh -tt code removed.
Send/return column in --joblog set to 0 instead of null.
parallel_tutorial.pod: Added CSV DBURL example.
This commit is contained in:
Ole Tange 2016-03-20 23:57:25 +01:00
parent 6d8ce313f1
commit bf91e06e00
15 changed files with 452 additions and 323 deletions

View file

@ -1,4 +1,5 @@
bin_SCRIPTS = parallel sql niceload bin_SCRIPTS = parallel sql niceload \
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh
install-exec-hook: install-exec-hook:
rm $(DESTDIR)$(bindir)/sem || true rm $(DESTDIR)$(bindir)/sem || true
@ -147,5 +148,6 @@ DISTCLEANFILES = parallel.1 sem.1 sql.1 niceload.1 parallel_tutorial.7 parallel_
parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_design.pdf parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_design.pdf
EXTRA_DIST = parallel sem sql niceload \ EXTRA_DIST = parallel sem sql niceload \
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh \
sem.pod parallel.pod niceload.pod parallel_tutorial.pod parallel_design.pod \ sem.pod parallel.pod niceload.pod parallel_tutorial.pod parallel_design.pod \
$(DISTCLEANFILES) $(DISTCLEANFILES)

View file

@ -217,7 +217,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
bin_SCRIPTS = parallel sql niceload bin_SCRIPTS = parallel sql niceload \
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh
@DOCUMENTATION_TRUE@man_MANS = parallel.1 sem.1 sql.1 niceload.1 parallel_tutorial.7 parallel_design.7 @DOCUMENTATION_TRUE@man_MANS = parallel.1 sem.1 sql.1 niceload.1 parallel_tutorial.7 parallel_design.7
@DOCUMENTATION_TRUE@doc_DATA = parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_design.html \ @DOCUMENTATION_TRUE@doc_DATA = parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_design.html \
@DOCUMENTATION_TRUE@ parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_design.texi \ @DOCUMENTATION_TRUE@ parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_design.texi \
@ -229,6 +231,7 @@ DISTCLEANFILES = parallel.1 sem.1 sql.1 niceload.1 parallel_tutorial.7 parallel_
parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_design.pdf parallel.pdf sem.pdf sql.pdf niceload.pdf parallel_tutorial.pdf parallel_design.pdf
EXTRA_DIST = parallel sem sql niceload \ EXTRA_DIST = parallel sem sql niceload \
env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh \
sem.pod parallel.pod niceload.pod parallel_tutorial.pod parallel_design.pod \ sem.pod parallel.pod niceload.pod parallel_tutorial.pod parallel_design.pod \
$(DISTCLEANFILES) $(DISTCLEANFILES)

View file

@ -59,7 +59,7 @@ if($opt::pipepart) {
@input_source_fh = (*STDIN); @input_source_fh = (*STDIN);
} }
} }
if($opt::sql) { if($opt::sqlmaster) {
# Create SQL table to hold joblog + output # Create SQL table to hold joblog + output
$Global::sql->create_table($#input_source_fh+1); $Global::sql->create_table($#input_source_fh+1);
if($opt::sqlworker) { if($opt::sqlworker) {
@ -760,7 +760,8 @@ sub options_hash {
"m" => \$opt::m, "m" => \$opt::m,
"X" => \$opt::X, "X" => \$opt::X,
"v" => \@opt::v, "v" => \@opt::v,
"sql=s" => \$opt::sql, "sql=s" => \$opt::retired,
"sqlmaster=s" => \$opt::sqlmaster,
"sqlworker=s" => \$opt::sqlworker, "sqlworker=s" => \$opt::sqlworker,
"sqlandworker=s" => \$opt::sqlandworker, "sqlandworker=s" => \$opt::sqlandworker,
"joblog=s" => \$opt::joblog, "joblog=s" => \$opt::joblog,
@ -972,7 +973,7 @@ sub parse_options {
if(defined $opt::tmpdir) { $ENV{'TMPDIR'} = $opt::tmpdir; } if(defined $opt::tmpdir) { $ENV{'TMPDIR'} = $opt::tmpdir; }
$opt::nice ||= 0; $opt::nice ||= 0;
if(defined $opt::help) { die_usage(); } if(defined $opt::help) { die_usage(); }
if(defined $opt::sqlandworker) { $opt::sql = $opt::sqlworker = $opt::sqlandworker; } if(defined $opt::sqlandworker) { $opt::sqlmaster = $opt::sqlworker = $opt::sqlandworker; }
if(defined $opt::colsep) { $Global::trim = 'lr'; } if(defined $opt::colsep) { $Global::trim = 'lr'; }
if(defined $opt::header) { $opt::colsep = defined $opt::colsep ? $opt::colsep : "\t"; } if(defined $opt::header) { $opt::colsep = defined $opt::colsep ? $opt::colsep : "\t"; }
if(defined $opt::trim) { $Global::trim = $opt::trim; } if(defined $opt::trim) { $Global::trim = $opt::trim; }
@ -1121,7 +1122,9 @@ sub parse_options {
$opt::jobs = "100%"; $opt::jobs = "100%";
} }
open_joblog(); open_joblog();
($opt::sql or $opt::sqlworker) and $Global::sql = SQL->new($opt::sql || $opt::sqlworker); if($opt::sqlmaster or $opt::sqlworker) {
$Global::sql = SQL->new($opt::sqlmaster || $opt::sqlworker);
}
} }
sub check_invalid_option_combinations { sub check_invalid_option_combinations {
@ -1168,6 +1171,7 @@ sub check_invalid_option_combinations {
"-W has been retired. Use --wd.", "-W has been retired. Use --wd.",
"-Y has been retired. Use --shebang.", "-Y has been retired. Use --shebang.",
"-H has been retired. Use --halt.", "-H has been retired. Use --halt.",
"--sql has been retired. Use --sqlmaster.",
"--ctrlc has been retired.", "--ctrlc has been retired.",
"--noctrlc has been retired."); "--noctrlc has been retired.");
::wait_and_exit(255); ::wait_and_exit(255);
@ -2356,7 +2360,7 @@ sub drain_job_queue {
::warning("There are no job slots available. Increase --jobs."); ::warning("There are no job slots available. Increase --jobs.");
} }
} }
while($opt::sql and not $Global::sql->finished()) { while($opt::sqlmaster and not $Global::sql->finished()) {
# SQL master # SQL master
$sleep = ::reap_usleep($sleep); $sleep = ::reap_usleep($sleep);
if($Global::sqlworker) { if($Global::sqlworker) {
@ -2376,7 +2380,7 @@ sub drain_job_queue {
or or
not $Global::start_no_new_jobs and not $Global::JobQueue->empty() not $Global::start_no_new_jobs and not $Global::JobQueue->empty()
or or
$opt::sql and not $Global::sql->finished()); $opt::sqlmaster and not $Global::sql->finished());
if($opt::progress) { if($opt::progress) {
my %progress = progress(); my %progress = progress();
::status("\r", $progress{'status'}, "\n"); ::status("\r", $progress{'status'}, "\n");
@ -3344,8 +3348,8 @@ sub reaper {
my $stiff; my $stiff;
my @pids_reaped; my @pids_reaped;
debug("run", "Reaper "); debug("run", "Reaper ");
# For efficiency surround with BEGIN/COMMIT when using $opt::sql # For efficiency surround with BEGIN/COMMIT when using $opt::sqlmaster
$opt::sql and $Global::sql->run("BEGIN;"); $opt::sqlmaster and $Global::sql->run("BEGIN;");
while (($stiff = waitpid(-1, &WNOHANG)) > 0) { while (($stiff = waitpid(-1, &WNOHANG)) > 0) {
# $stiff = pid of dead process # $stiff = pid of dead process
push(@pids_reaped,$stiff); push(@pids_reaped,$stiff);
@ -3403,7 +3407,7 @@ sub reaper {
::status("\r",$progress{'status'}); ::status("\r",$progress{'status'});
} }
} }
$opt::sql and $Global::sql->run("COMMIT;"); $opt::sqlmaster and $Global::sql->run("COMMIT;");
debug("run", "done "); debug("run", "done ");
return @pids_reaped; return @pids_reaped;
} }
@ -5821,11 +5825,12 @@ sub rsync_transfer_cmd {
return "true"; return "true";
} }
my $rsync_destdir; my $rsync_destdir;
if($file =~ m:^/:) { my $relpath = ($file !~ m:^/:) || ($file =~ m:/\./:); # Is the path relative or /./?
if($relpath) {
$rsync_destdir = ::shell_quote_file($workdir);
} else {
# rsync /foo/bar / # rsync /foo/bar /
$rsync_destdir = "/"; $rsync_destdir = "/";
} else {
$rsync_destdir = ::shell_quote_file($workdir);
} }
$file = ::shell_quote_file($file); $file = ::shell_quote_file($file);
my $sshcmd = $self->sshcommand(); my $sshcmd = $self->sshcommand();
@ -6897,14 +6902,17 @@ sub base64_eval {
# * decodes them # * decodes them
# * evals the result # * evals the result
# Reverse of string_base64 + eval # Reverse of string_base64 + eval
# Will be wrapped in ' so single quote is forbidden # Will be wrapped in ' so single quote is forbidden.
# Spaces are stripped so spaces cannot be significant.
# The funny 'use IPC::Open3'-syntax is to avoid spaces and
# to make it clear that this is a GNU Parallel command
# when looking at the process table.
# Returns: # Returns:
# $script = 1-liner for perl -e # $script = 1-liner for perl -e
my $script = ::spacefree(0,q{ my $script = ::spacefree(0,q{
@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64"); @GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");
eval "@GNU_Parallel"; eval "@GNU_Parallel";
my $eval; my $eval = decode_base64(join"",@ARGV);
$eval = decode_base64(join"",@ARGV);
eval $eval; eval $eval;
}); });
::debug("base64",$script,"\n"); ::debug("base64",$script,"\n");
@ -7145,16 +7153,17 @@ sub transfer {
# Returns: # Returns:
# @transfer - File names of files to transfer # @transfer - File names of files to transfer
my $self = shift; my $self = shift;
$self->{'transfersize'} = 0;
my $transfersize = 0;
my @transfer = $self->{'commandline'}-> my @transfer = $self->{'commandline'}->
replace_placeholders($self->{'commandline'}{'transfer_files'},0,0); replace_placeholders($self->{'commandline'}{'transfer_files'},0,0);
for(@transfer) { for(@transfer) {
# filesize # filesize
if(-e $_) { if(-e $_) {
$self->{'transfersize'} += (stat($_))[7]; $transfersize += (stat($_))[7];
} }
} }
$self->add_transfersize($transfersize);
return @transfer; return @transfer;
} }
@ -7228,7 +7237,7 @@ sub sshreturn {
my $pre = ""; my $pre = "";
for my $file ($self->return()) { for my $file ($self->return()) {
$file =~ s:^\./::g; # Remove ./ if any $file =~ s:^\./::g; # Remove ./ if any
my $relpath = ($file !~ m:^/:); # Is the path relative? my $relpath = ($file !~ m:^/:) || ($file =~ m:/\./:); # Is the path relative or /./?
my $cd = ""; my $cd = "";
my $wd = ""; my $wd = "";
if($relpath) { if($relpath) {
@ -7454,7 +7463,7 @@ sub start {
if($opt::ungroup or $opt::sqlworker) { if($opt::ungroup or $opt::sqlworker) {
print_dryrun_and_verbose($stdout_fh,$job,$command); print_dryrun_and_verbose($stdout_fh,$job,$command);
} }
if($opt::dryrun or $opt::sql) { $command = "true"; } if($opt::dryrun or $opt::sqlmaster) { $command = "true"; }
$ENV{'PARALLEL_SEQ'} = $job->seq(); $ENV{'PARALLEL_SEQ'} = $job->seq();
$ENV{'PARALLEL_PID'} = $$; $ENV{'PARALLEL_PID'} = $$;
$ENV{'PARALLEL_TMP'} = ::tmpname("par"); $ENV{'PARALLEL_TMP'} = ::tmpname("par");
@ -7735,12 +7744,16 @@ sub print {
if($opt::pipe and $self->virgin()) { if($opt::pipe and $self->virgin()) {
# Skip --joblog, --dryrun, --verbose # Skip --joblog, --dryrun, --verbose
} else { } else {
if($opt::ungroup and $Global::joblog and defined $self->{'exitstatus'}) { if($opt::ungroup) {
# NULL returnsize = 0 returnsize
$self->returnsize() or $self->add_returnsize(0);
if($Global::joblog and defined $self->{'exitstatus'}) {
# Add to joblog when finished # Add to joblog when finished
$self->print_joblog(); $self->print_joblog();
# Printing is only relevant for grouped/--line-buffer output. # Printing is only relevant for grouped/--line-buffer output.
$opt::ungroup and return; $opt::ungroup and return;
} }
}
# Check for disk full # Check for disk full
::exit_if_disk_full(); ::exit_if_disk_full();
@ -7749,7 +7762,7 @@ sub print {
and and
not $self->{'verbose_printed'} not $self->{'verbose_printed'}
and and
not $opt::sql not $opt::sqlmaster
and and
not $opt::sqlworker) { not $opt::sqlworker) {
$self->{'verbose_printed'}++; $self->{'verbose_printed'}++;
@ -7870,13 +7883,6 @@ sub linebuffer_print {
my $i = ::rindex64($partial,"\n"); my $i = ::rindex64($partial,"\n");
if($i != -1) { if($i != -1) {
# One or more complete lines were found # One or more complete lines were found
if($fdno == 2 and not $self->{'printed_first_line',$fdno}++) {
# OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt
# This is a crappy way of ignoring it.
$$partial =~ s/^(client_process_control: )?tcgetattr: Invalid argument\n//;
# Length of partial line has changed: Find the last \n again
$i = ::rindex64($partial,"\n");
}
$outputlength += $i+1; $outputlength += $i+1;
if($opt::tag or defined $opt::tagstring) { if($opt::tag or defined $opt::tagstring) {
# Replace ^ with $tag within the full line # Replace ^ with $tag within the full line
@ -7929,20 +7935,6 @@ sub tag_print {
seek $in_fh, 0, 0; seek $in_fh, 0, 0;
# $in_fh is now ready for reading at position 0 # $in_fh is now ready for reading at position 0
my $tag = $self->tag(); my $tag = $self->tag();
if($fdno == 2) {
# OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt
# This is a crappy way of ignoring it.
while(<$in_fh>) {
if(/^(client_process_control: )?tcgetattr: Invalid argument\n/) {
# Skip
} else {
$self->add_returnsize(length $_);
print $out_fd $tag,$_;
}
# At most run the loop once
last;
}
}
my $outputlength = 0; my $outputlength = 0;
while(<$in_fh>) { while(<$in_fh>) {
print $out_fd $tag,$_; print $out_fd $tag,$_;
@ -8299,7 +8291,7 @@ sub populate {
} }
} }
} }
if($opt::sql) { if($opt::sqlmaster) {
# Insert the V1..Vn for this $seq in SQL table instead of generating one # Insert the V1..Vn for this $seq in SQL table instead of generating one
$Global::sql->insert_records($self->seq(),$self->{'arg_list_flat_orig'}); $Global::sql->insert_records($self->seq(),$self->{'arg_list_flat_orig'});
} }
@ -9924,7 +9916,7 @@ sub run {
} }
my @retval; my @retval;
my $dbh = $self->{'dbh'}; my $dbh = $self->{'dbh'};
::debug("sql","$opt::sql$opt::sqlworker run $stmt\n"); ::debug("sql","$opt::sqlmaster$opt::sqlworker run $stmt\n");
# Execute with the rest of the args - if any # Execute with the rest of the args - if any
my $rv; my $rv;
my $sth; my $sth;
@ -10034,10 +10026,10 @@ sub insert_records {
my $record_ref = shift; my $record_ref = shift;
my $table = $self->table(); my $table = $self->table();
my $v_cols = join ",", map { "V$_" } (1..$self->max_number_of_args()); my $v_cols = join ",", map { "V$_" } (1..$self->max_number_of_args());
# Two extra value due to $seq, Exitval # Two extra value due to $seq, Exitval, Send
my $v_vals = join ",", map { "?" } (1..$self->max_number_of_args()+2); my $v_vals = join ",", map { "?" } (1..$self->max_number_of_args()+3);
$self->run("INSERT INTO $table (Seq,Exitval,$v_cols) ". $self->run("INSERT INTO $table (Seq,Exitval,Send,$v_cols) ".
"VALUES ($v_vals);", $seq, -1000, @$record_ref[1..$#$record_ref]); "VALUES ($v_vals);", $seq, -1000, 0, @$record_ref[1..$#$record_ref]);
} }
sub get_record { sub get_record {

View file

@ -1791,7 +1791,12 @@ Do not use the first line of input (used by GNU B<parallel> itself
when called with B<--shebang>). when called with B<--shebang>).
=item B<--sql> I<DBURL> =item B<--sql> I<DBURL> (obsolete)
Use B<--sqlmaster> instead.
=item B<--sqlmaster> I<DBURL>
Submit jobs via SQL server. I<DBURL> must point to a table, which will Submit jobs via SQL server. I<DBURL> must point to a table, which will
contain the same information as B<--joblog>, the values from the input contain the same information as B<--joblog>, the values from the input
@ -1801,9 +1806,9 @@ columns Stdout and Stderr).
The table will be dropped and created with the correct amount of The table will be dropped and created with the correct amount of
V-columns. V-columns.
B<--sql> does not run any jobs, but it creates the values for the jobs B<--sqlmaster> does not run any jobs, but it creates the values for
to be run and wait for them to complete. One or more B<--sqlworker> the jobs to be run and wait for them to complete. One or more
must be run to actually execute the jobs. B<--sqlworker> must be run to actually execute the jobs.
The format of a DBURL is: The format of a DBURL is:
@ -1825,14 +1830,14 @@ It can also be an alias from ~/.sql/aliases:
=item B<--sqlandworker> I<DBURL> =item B<--sqlandworker> I<DBURL>
Shorthand for: B<--sql> I<DBURL> B<--sqlworker> I<DBURL>. Shorthand for: B<--sqlmaster> I<DBURL> B<--sqlworker> I<DBURL>.
=item B<--sqlworker> I<DBURL> =item B<--sqlworker> I<DBURL>
Execute jobs via SQL server. Read the input sources variables from the Execute jobs via SQL server. Read the input sources variables from the
table pointed to by I<DBURL>. The I<command> on the command line table pointed to by I<DBURL>. The I<command> on the command line
should be the same as given by B<--sql>. should be the same as given by B<--sqlmaster>.
=item B<--ssh> I<sshcommand> =item B<--ssh> I<sshcommand>
@ -2079,11 +2084,11 @@ I<server.example.com> to the file I</tmp/foo/bar.txt> before running
B<wc /tmp/foo/bar.txt> on I<server.example.com>. B<wc /tmp/foo/bar.txt> on I<server.example.com>.
echo /tmp/./foo/bar.txt | parallel \ echo /tmp/./foo/bar.txt | parallel \
--sshlogin server.example.com --transferfile {} wc --sshlogin server.example.com --transferfile {} wc {= s:.*/./:./: =}
This will transfer the file I</tmp/foo/bar.txt> to the computer This will transfer the file I</tmp/foo/bar.txt> to the computer
I<server.example.com> to the file I<foo/bar.txt> before running I<server.example.com> to the file I<foo/bar.txt> before running
B<wc /tmp/./foo/bar.txt> on I<server.example.com>. B<wc ./foo/bar.txt> on I<server.example.com>.
B<--transferfile> is often used with B<--return> and B<--cleanup>. A B<--transferfile> is often used with B<--return> and B<--cleanup>. A
shorthand for B<--transferfile {}> is B<--transfer>. shorthand for B<--transferfile {}> is B<--transfer>.
@ -3857,17 +3862,13 @@ Killed by Ctrl-C, timeout, not enough memory or similar.
$job->skip() was called in {= =}. $job->skip() was called in {= =}.
=item Z<>-1200 (In SQL table) =item Z<>-1000 (In SQL table)
Job is ready to run (used with --sql). Job is ready to run (set by --sqlmaster).
=item Z<>-1220 (In SQL table) =item Z<>-1220 (In SQL table)
Job is taken by worker to be started (used with --sql). Job is taken by worker (set by --sqlworker).
=item Z<>-1250 (In SQL table)
Job is running (used with --sql).
=back =back

View file

@ -83,6 +83,8 @@
</li> </li>
<li><a href="#Saving-to-an-SQL-base-advanced">Saving to an SQL base (advanced)</a> <li><a href="#Saving-to-an-SQL-base-advanced">Saving to an SQL base (advanced)</a>
<ul> <ul>
<li><a href="#CSV-as-SQL-base">CSV as SQL base</a></li>
<li><a href="#DBURL-as-table">DBURL as table</a></li>
<li><a href="#Using-multiple-workers">Using multiple workers</a></li> <li><a href="#Using-multiple-workers">Using multiple workers</a></li>
</ul> </ul>
</li> </li>
@ -125,10 +127,10 @@
<dl> <dl>
<dt id="parallel-version-20140622">parallel &gt;= version 20140622</dt> <dt id="parallel-version-20160222">parallel &gt;= version 20160222</dt>
<dd> <dd>
<p>Install the newest version with:</p> <p>Install the newest version using your package manager or with:</p>
<pre><code> (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash</code></pre> <pre><code> (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash</code></pre>
@ -1802,7 +1804,7 @@
<p>Output:</p> <p>Output:</p>
<pre><code> ssh lo -- exec perl -e \&#39;&#39;@GNU_Parallel=(&quot;use&quot;,&quot;IPC::Open3;&quot;,&quot;use&quot;,&quot;MIME::Base64&quot;); <pre><code> ssh lo -- exec perl -e \&#39;&#39;@GNU_Parallel=(&quot;use&quot;,&quot;IPC::Open3;&quot;,&quot;use&quot;,&quot;MIME::Base64&quot;);
eval&quot;@GNU_Parallel&quot;;my$eval;$eval=decode_base64(join&quot;&quot;,@ARGV);eval$eval;&#39;\&#39; eval&quot;@GNU_Parallel&quot;;my$eval=decode_base64(join&quot;&quot;,@ARGV);eval$eval;&#39;\&#39;
JEVOVnsiUEFSQUxMRUxfUElEIn09IjI3MzQiOyRFTlZ7IlBBUkFMTEVMX1NFUSJ9PSIx JEVOVnsiUEFSQUxMRUxfUElEIn09IjI3MzQiOyRFTlZ7IlBBUkFMTEVMX1NFUSJ9PSIx
IjskYmFzaGZ1bmMgPSAiIjtAQVJHVj0iZWNobyBiYXIiOyRzaGVsbD0iJEVOVntTSEVM IjskYmFzaGZ1bmMgPSAiIjtAQVJHVj0iZWNobyBiYXIiOyRzaGVsbD0iJEVOVntTSEVM
TH0iOyR0bXBkaXI9Ii90bXAiOyRuaWNlPTA7ZG97JEVOVntQQVJBTExFTF9UTVB9PSR0 TH0iOyR0bXBkaXI9Ii90bXAiOyRuaWNlPTA7ZG97JEVOVntQQVJBTExFTF9UTVB9PSR0
@ -1829,7 +1831,7 @@
<pre><code> ( ssh lo -- mkdir -p ./.parallel/tmp/hk-3492-1;rsync --protocol 30 <pre><code> ( ssh lo -- mkdir -p ./.parallel/tmp/hk-3492-1;rsync --protocol 30
-rlDzR -essh ./abc-file lo:./.parallel/tmp/hk-3492-1 );ssh lo -- -rlDzR -essh ./abc-file lo:./.parallel/tmp/hk-3492-1 );ssh lo --
exec perl -e \&#39;&#39;@GNU_Parallel=(&quot;use&quot;,&quot;IPC::Open3;&quot;,&quot;use&quot;,&quot;MIME::Base64&quot;); exec perl -e \&#39;&#39;@GNU_Parallel=(&quot;use&quot;,&quot;IPC::Open3;&quot;,&quot;use&quot;,&quot;MIME::Base64&quot;);
eval&quot;@GNU_Parallel&quot;;my$eval;$eval=decode_base64(join&quot;&quot;,@ARGV);eval$eval;&#39;\&#39; eval&quot;@GNU_Parallel&quot;;my$eval=decode_base64(join&quot;&quot;,@ARGV);eval$eval;&#39;\&#39;
c3lzdGVtKCJta2RpciIsIi1wIiwiLS0iLCIucGFyYWxsZWwvdG1wL2hrLTM0OTItMSIp c3lzdGVtKCJta2RpciIsIi1wIiwiLS0iLCIucGFyYWxsZWwvdG1wL2hrLTM0OTItMSIp
OyBjaGRpciAiLnBhcmFsbGVsL3RtcC9oay0zNDkyLTEiIHx8cHJpbnQoU1RERVJSICJw OyBjaGRpciAiLnBhcmFsbGVsL3RtcC9oay0zNDkyLTEiIHx8cHJpbnQoU1RERVJSICJw
YXJhbGxlbDogQ2Fubm90IGNoZGlyIHRvIC5wYXJhbGxlbC90bXAvaGstMzQ5Mi0xXG4i YXJhbGxlbDogQ2Fubm90IGNoZGlyIHRvIC5wYXJhbGxlbC90bXAvaGstMzQ5Mi0xXG4i
@ -1867,7 +1869,41 @@
<h1 id="Saving-to-an-SQL-base-advanced">Saving to an SQL base (advanced)</h1> <h1 id="Saving-to-an-SQL-base-advanced">Saving to an SQL base (advanced)</h1>
<p>GNU <b>parallel</b> can save into an SQL base. Point GNU <b>parallel</b> to a table and it will put the joblog there together with the variables and the outout each in their own column.</p> <p>GNU <b>parallel</b> can save into an SQL base. Point GNU <b>parallel</b> to a table and it will put the joblog there together with the variables and the output each in their own column.</p>
<h2 id="CSV-as-SQL-base">CSV as SQL base</h2>
<p>The simplest is to use a CSV file as the storage table:</p>
<pre><code> parallel --sqlandworker csv:////%2Ftmp%2Flog.csv seq ::: 10 ::: 12 13 14
cat /tmp/log.csv</code></pre>
<p>Note how &#39;/&#39; in the path must be written as %2F.</p>
<p>Output will be similar to:</p>
<pre><code> Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
1,:,1458254498.254,0.069,0,9,0,0,&quot;seq 10 12&quot;,10,12,&quot;10
11
12
&quot;,
2,:,1458254498.278,0.080,0,12,0,0,&quot;seq 10 13&quot;,10,13,&quot;10
11
12
13
&quot;,
3,:,1458254498.301,0.083,0,15,0,0,&quot;seq 10 14&quot;,10,14,&quot;10
11
12
13
14
&quot;,</code></pre>
<p>A proper CSV reader (like LibreOffice or R&#39;s read.csv) will read this format correctly - even with fields containing newlines as above.</p>
<h2 id="DBURL-as-table">DBURL as table</h2>
<p>The CSV file is an example of a DBURL.</p>
<p>GNU <b>parallel</b> uses a DBURL to address the table. A DBURL has this format:</p> <p>GNU <b>parallel</b> uses a DBURL to address the table. A DBURL has this format:</p>
@ -1877,9 +1913,10 @@
<pre><code> mysql://scott:tiger@my.example.com/mydatabase/mytable <pre><code> mysql://scott:tiger@my.example.com/mydatabase/mytable
postgresql://scott:tiger@pg.example.com/mydatabase/mytable postgresql://scott:tiger@pg.example.com/mydatabase/mytable
sqlite3:///%2Ftmp%2Fmydatabase/mytable</code></pre> sqlite3:///%2Ftmp%2Fmydatabase/mytable
csv:////%2Ftmp%2Flog.csv</code></pre>
<p>To refer to <b>/tmp/mydatabase</b> with <b>sqlite</b> you need to encode the <b>/</b> as <b>%2F</b>.</p> <p>To refer to <b>/tmp/mydatabase</b> with <b>sqlite</b> or <b>csv</b> you need to encode the <b>/</b> as <b>%2F</b>.</p>
<p>Run a job using <b>sqlite</b> on <b>mytable</b> in <b>/tmp/mydatabase</b>:</p> <p>Run a job using <b>sqlite</b> on <b>mytable</b> in <b>/tmp/mydatabase</b>:</p>
@ -1907,15 +1944,15 @@
<h2 id="Using-multiple-workers">Using multiple workers</h2> <h2 id="Using-multiple-workers">Using multiple workers</h2>
<p>Using an SQL base as storage costs a lot of performance.</p> <p>Using an SQL base as storage costs overhead in the order of 1 second per job.</p>
<p>One of the situations where it makes sense is if you have multiple workers.</p> <p>One of the situations where it makes sense is if you have multiple workers.</p>
<p>You can then have a single master machine that submits jobs to the SQL base (but does not do any of the work):</p> <p>You can then have a single master machine that submits jobs to the SQL base (but does not do any of the work):</p>
<pre><code> parallel --sql $DBURLTABLE echo ::: foo bar ::: baz quuz</code></pre> <pre><code> parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz</code></pre>
<p>On the worker machines you run exactly the same command except you replace <b>--sql</b> with <b>--sqlworker</b>.</p> <p>On the worker machines you run exactly the same command except you replace <b>--sqlmaster</b> with <b>--sqlworker</b>.</p>
<pre><code> parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz</code></pre> <pre><code> parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz</code></pre>
@ -2340,8 +2377,7 @@
<pre><code> #!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp <pre><code> #!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
var argv = Environment.GetEnvironmentVariable(&quot;ARGV&quot;); var argv = Environment.GetEnvironmentVariable(&quot;ARGV&quot;);
print(&quot;Arguments &quot;+argv); print(&quot;Arguments &quot;+argv);</code></pre>
</code></pre>
</dd> </dd>
</dl> </dl>

View file

@ -1796,7 +1796,7 @@ the workdir, and setting B<--nice> value. B<-vv> shows all of this.
Output: Output:
ssh lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64"); ssh lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");
eval"@GNU_Parallel";my$eval;$eval=decode_base64(join"",@ARGV);eval$eval;'\' eval"@GNU_Parallel";my$eval=decode_base64(join"",@ARGV);eval$eval;'\'
JEVOVnsiUEFSQUxMRUxfUElEIn09IjI3MzQiOyRFTlZ7IlBBUkFMTEVMX1NFUSJ9PSIx JEVOVnsiUEFSQUxMRUxfUElEIn09IjI3MzQiOyRFTlZ7IlBBUkFMTEVMX1NFUSJ9PSIx
IjskYmFzaGZ1bmMgPSAiIjtAQVJHVj0iZWNobyBiYXIiOyRzaGVsbD0iJEVOVntTSEVM IjskYmFzaGZ1bmMgPSAiIjtAQVJHVj0iZWNobyBiYXIiOyRzaGVsbD0iJEVOVntTSEVM
TH0iOyR0bXBkaXI9Ii90bXAiOyRuaWNlPTA7ZG97JEVOVntQQVJBTExFTF9UTVB9PSR0 TH0iOyR0bXBkaXI9Ii90bXAiOyRuaWNlPTA7ZG97JEVOVntQQVJBTExFTF9UTVB9PSR0
@ -1810,7 +1810,8 @@ Output:
JD8mMTI3PzEyOCsoJD8mMTI3KToxKyQ/Pj44KQ==; JD8mMTI3PzEyOCsoJD8mMTI3KToxKyQ/Pj44KQ==;
bar bar
When the command gets more complex, the output is so hard to read, that it is only useful for debugging: When the command gets more complex, the output is so hard to read,
that it is only useful for debugging:
my_func3() { my_func3() {
echo in my_func $1 > $1.out echo in my_func $1 > $1.out
@ -1823,7 +1824,7 @@ Output will be similar to:
( ssh lo -- mkdir -p ./.parallel/tmp/hk-3492-1;rsync --protocol 30 ( ssh lo -- mkdir -p ./.parallel/tmp/hk-3492-1;rsync --protocol 30
-rlDzR -essh ./abc-file lo:./.parallel/tmp/hk-3492-1 );ssh lo -- -rlDzR -essh ./abc-file lo:./.parallel/tmp/hk-3492-1 );ssh lo --
exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64"); exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");
eval"@GNU_Parallel";my$eval;$eval=decode_base64(join"",@ARGV);eval$eval;'\' eval"@GNU_Parallel";my$eval=decode_base64(join"",@ARGV);eval$eval;'\'
c3lzdGVtKCJta2RpciIsIi1wIiwiLS0iLCIucGFyYWxsZWwvdG1wL2hrLTM0OTItMSIp c3lzdGVtKCJta2RpciIsIi1wIiwiLS0iLCIucGFyYWxsZWwvdG1wL2hrLTM0OTItMSIp
OyBjaGRpciAiLnBhcmFsbGVsL3RtcC9oay0zNDkyLTEiIHx8cHJpbnQoU1RERVJSICJw OyBjaGRpciAiLnBhcmFsbGVsL3RtcC9oay0zNDkyLTEiIHx8cHJpbnQoU1RERVJSICJw
YXJhbGxlbDogQ2Fubm90IGNoZGlyIHRvIC5wYXJhbGxlbC90bXAvaGstMzQ5Mi0xXG4i YXJhbGxlbDogQ2Fubm90IGNoZGlyIHRvIC5wYXJhbGxlbC90bXAvaGstMzQ5Mi0xXG4i
@ -1863,7 +1864,42 @@ Output will be similar to:
GNU B<parallel> can save into an SQL base. Point GNU B<parallel> to a GNU B<parallel> can save into an SQL base. Point GNU B<parallel> to a
table and it will put the joblog there together with the variables and table and it will put the joblog there together with the variables and
the outout each in their own column. the output each in their own column.
=head2 CSV as SQL base
The simplest is to use a CSV file as the storage table:
parallel --sqlandworker csv:////%2Ftmp%2Flog.csv seq ::: 10 ::: 12 13 14
cat /tmp/log.csv
Note how '/' in the path must be written as %2F.
Output will be similar to:
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
1,:,1458254498.254,0.069,0,9,0,0,"seq 10 12",10,12,"10
11
12
",
2,:,1458254498.278,0.080,0,12,0,0,"seq 10 13",10,13,"10
11
12
13
",
3,:,1458254498.301,0.083,0,15,0,0,"seq 10 14",10,14,"10
11
12
13
14
",
A proper CSV reader (like LibreOffice or R's read.csv) will read this
format correctly - even with fields containing newlines as above.
=head2 DBURL as table
The CSV file is an example of a DBURL.
GNU B<parallel> uses a DBURL to address the table. A DBURL has this format: GNU B<parallel> uses a DBURL to address the table. A DBURL has this format:
@ -1874,8 +1910,10 @@ Example:
mysql://scott:tiger@my.example.com/mydatabase/mytable mysql://scott:tiger@my.example.com/mydatabase/mytable
postgresql://scott:tiger@pg.example.com/mydatabase/mytable postgresql://scott:tiger@pg.example.com/mydatabase/mytable
sqlite3:///%2Ftmp%2Fmydatabase/mytable sqlite3:///%2Ftmp%2Fmydatabase/mytable
csv:////%2Ftmp%2Flog.csv
To refer to B</tmp/mydatabase> with B<sqlite> you need to encode the B</> as B<%2F>. To refer to B</tmp/mydatabase> with B<sqlite> or B<csv> you need to
encode the B</> as B<%2F>.
Run a job using B<sqlite> on B<mytable> in B</tmp/mydatabase>: Run a job using B<sqlite> on B<mytable> in B</tmp/mydatabase>:
@ -1905,7 +1943,8 @@ output and standard error, respectively.
=head2 Using multiple workers =head2 Using multiple workers
Using an SQL base as storage costs a lot of performance. Using an SQL base as storage costs overhead in the order of 1 second
per job.
One of the situations where it makes sense is if you have multiple One of the situations where it makes sense is if you have multiple
workers. workers.
@ -1913,10 +1952,10 @@ workers.
You can then have a single master machine that submits jobs to the SQL You can then have a single master machine that submits jobs to the SQL
base (but does not do any of the work): base (but does not do any of the work):
parallel --sql $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz
On the worker machines you run exactly the same command except you On the worker machines you run exactly the same command except you
replace B<--sql> with B<--sqlworker>. replace B<--sqlmaster> with B<--sqlworker>.
parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz
@ -2357,7 +2396,6 @@ This technique can be used for:
var argv = Environment.GetEnvironmentVariable("ARGV"); var argv = Environment.GetEnvironmentVariable("ARGV");
print("Arguments "+argv); print("Arguments "+argv);
=back =back
=head1 Semaphore =head1 Semaphore

View file

@ -116,6 +116,13 @@ echo '### Test --trc "-- " "-- "'
parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--.a || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--.a || echo OK';
parallel --nonall -k -S csh@lo,sh@lo 'ls ./--?.a || echo OK' parallel --nonall -k -S csh@lo,sh@lo 'ls ./--?.a || echo OK'
echo '### Test --trc "/tmp/./--- /A" "/tmp/./ ---/B"'
mkdir -p '/tmp/./--- ' '/tmp/ ---';
touch -- '/tmp/./--- /A' '/tmp/ ---/B';
rm -f ./---?/A.a ./?---/B.a;
parallel --trc {=s:.*/./::=}.a -S csh@lo,sh@lo touch ./{=s:.*/./::=}.a ::: '/tmp/./--- /A' '/tmp/./ ---/B';
ls ./---?/A.a ./?---/B.a;
parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--- ./---? || echo OK';
echo '### bug #46519: --onall ignores --transfer' echo '### bug #46519: --onall ignores --transfer'
touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???; touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???;

View file

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# TODO ksh fish
unset run_test unset run_test
# SSH only allowed to localhost/lo # SSH only allowed to localhost/lo
@ -18,11 +20,7 @@ echo 'bug #40137: SHELL not bash: Warning when exporting funcs'
. <(printf 'myfunc() {\necho $1\n}'); export -f myfunc; SHELL=/bin/sh parallel --env myfunc -S lo myfunc ::: warning . <(printf 'myfunc() {\necho $1\n}'); export -f myfunc; SHELL=/bin/sh parallel --env myfunc -S lo myfunc ::: warning
echo 'env_parallel from man page - transfer non-exported var' echo 'env_parallel from man page - transfer non-exported var'
env_parallel() { source $(which env_parallel.bash);
export parallel_bash_environment="$(echo "shopt -s expand_aliases 2>/dev/null"; alias;typeset -p | grep -vFf <(readonly; echo GROUPS; echo FUNCNAME; echo DIRSTACK; echo _; echo PIPESTATUS; echo USERNAME) | grep -v BASH_;typeset -f)";
`which parallel` "$@";
unset parallel_bash_environment;
};
var=nonexported env_parallel -S parallel@lo echo '$var' ::: variable var=nonexported env_parallel -S parallel@lo echo '$var' ::: variable
echo 'compared to parallel - no transfer non-exported var' echo 'compared to parallel - no transfer non-exported var'
@ -95,7 +93,8 @@ echo '### bug #43746: --transfer and --return of multiple inputs {1} and {2}'
echo '### and:' echo '### and:'
echo '### bug #44371: --trc with csh complains' echo '### bug #44371: --trc with csh complains'
cd /tmp; echo 1 > file1; echo 2 > file2; cd /tmp; echo 1 > file1; echo 2 > file2;
parallel -Scsh@lo --trc {1}.a --trc {2}.b 'echo A {1} > {1}.a; echo B {2} > {2}.b' ::: file1 ::: file2; parallel -Scsh@lo --transferfile {1} --transferfile {2} --trc {1}.a --trc {2}.b
'(cat {1}; echo A {1}) > {1}.a; (cat {2};echo B {2}) > {2}.b' ::: file1 ::: file2;
cat file1.a file2.b; cat file1.a file2.b;
rm /tmp/file1 /tmp/file2 /tmp/file1.a /tmp/file2.b rm /tmp/file1 /tmp/file2 /tmp/file1.a /tmp/file2.b

View file

@ -42,6 +42,8 @@ perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' ../../src/
s/^[123] [abc] [ABC]$/123 abc ABC/g; s/^[123] [abc] [ABC]$/123 abc ABC/g;
# Remote script # Remote script
s/(PARALLEL_PID\D+)\d+/${1}000000/g; s/(PARALLEL_PID\D+)\d+/${1}000000/g;
# sql timing
s/,:,\d+.\d+,\d+.\d+/,:,000000000.000,0.000/g;
# /usr/bin/time -f %e # /usr/bin/time -f %e
s/^(\d+)\.\d+$/$1/; s/^(\d+)\.\d+$/$1/;
# Base 64 string # Base 64 string

View file

@ -155,7 +155,7 @@ pod2pdf --output-file ./parallel_design.pdf ./parallel_design.pod --title "GNU P
Warning: pod2pdf not found. Using old parallel_design.pdf Warning: pod2pdf not found. Using old parallel_design.pdf
make[0]: Entering directory `/tmp/parallel-00000000/src' make[0]: Entering directory `/tmp/parallel-00000000/src'
/bin/mkdir -p '/usr/local/bin' /bin/mkdir -p '/usr/local/bin'
/usr/bin/install -c parallel sql niceload '/usr/local/bin' /usr/bin/install -c parallel sql niceload env_parallel.bash env_parallel.zsh env_parallel.fish env_parallel.ksh '/usr/local/bin'
make install-exec-hook make install-exec-hook
make[0]: Entering directory `/tmp/parallel-00000000/src' make[0]: Entering directory `/tmp/parallel-00000000/src'
rm /usr/local/bin/sem || true rm /usr/local/bin/sem || true

View file

@ -3,86 +3,86 @@ echo '### --sqlandworker mysql'
(sleep 2; parallel --sqlworker $MYSQLTBL sleep .3\;echo >$T1) & (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;' 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 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 1 :9999990 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 2 :9999990 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 3 :9999990 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 4 :9999990 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 5 :9999990 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 6 :9999990 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 7 :9999990 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 8 :9999990 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 9 :9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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:9999990 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 999:9999990 4 0 0 sleep .3;echo 5 e 5 e 5 e\n
echo '### --sqlandworker postgresql' echo '### --sqlandworker postgresql'
### --sqlandworker postgresql ### --sqlandworker postgresql
(sleep 2; parallel --sqlworker $PGTBL sleep .3\;echo >$T3) & (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;' 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 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 +| 1 | : |999|999| 0 | 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 +| 2 | : |999|999| 0 | 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 +| 3 | : |999|999| 0 | 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 +| 4 | : |999|999| 0 | 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 +| 5 | : |999|999| 0 | 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 +| 6 | : |999|999| 0 | 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 +| 7 | : |999|999| 0 | 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 +| 8 | : |999|999| 0 | 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 +| 9 | : |999|999| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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| 0 | 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 +| 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | 5 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
(999rows) (999rows)
@ -91,55 +91,55 @@ echo '### --sqlandworker sqlite'
(sleep 2; parallel --sqlworker $SQLITETBL sleep .3\;echo >$T5) & (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;' 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 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 1|:|999|999|0|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 2|:|999|999|0|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 3|:|999|999|0|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 4|:|999|999|0|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 5|:|999|999|0|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 6|:|999|999|0|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 7|:|999|999|0|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 8|:|999|999|0|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 9|:|999|999|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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|0|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 999|:|999|999|0|4|0|0|sleep .3;echo 5 e|5|e|5 e
| |
echo '### --sqlandworker postgresql -S lo' echo '### --sqlandworker postgresql -S lo'
### --sqlandworker postgresql -S lo ### --sqlandworker postgresql -S lo
@ -147,55 +147,55 @@ echo '### --sqlandworker postgresql -S lo'
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;' 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 seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
-----+------+----------------+------------+------+---------+---------+---------+-------------------+----+----+--------+-------- -----+------+----------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
1 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | 1 a +| 1 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | 1 a +|
| | | | | | | | | | | | | | | | | | | | | | | |
2 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | 1 b +| 2 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | 1 b +|
| | | | | | | | | | | | | | | | | | | | | | | |
3 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | 1 c +| 3 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | 1 c +|
| | | | | | | | | | | | | | | | | | | | | | | |
4 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | 1 d +| 4 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | 1 d +|
| | | | | | | | | | | | | | | | | | | | | | | |
5 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | 1 e +| 5 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | 1 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
6 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | 2 a +| 6 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | 2 a +|
| | | | | | | | | | | | | | | | | | | | | | | |
7 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | 2 b +| 7 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | 2 b +|
| | | | | | | | | | | | | | | | | | | | | | | |
8 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | 2 c +| 8 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | 2 c +|
| | | | | | | | | | | | | | | | | | | | | | | |
9 | lo |999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | 2 d +| 9 | lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | 2 d +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | 2 e +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | 2 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | 3 a +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | 3 a +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | 3 b +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | 3 b +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | 3 c +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | 3 c +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | 3 d +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | 3 d +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | 3 e +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | 3 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | 4 a +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | 4 a +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | 4 b +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | 4 b +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | 4 c +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | 4 c +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | 4 d +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | 4 d +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | 4 e +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | 4 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | 5 a +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | 5 a +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | 5 b +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | 5 b +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | 5 c +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | 5 c +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | 5 d +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | 5 d +|
| | | | | | | | | | | | | | | | | | | | | | | |
999| lo |999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | 5 e +| 999| lo |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | 5 e +|
| | | | | | | | | | | | | | | | | | | | | | | |
(999rows) (999rows)
@ -206,31 +206,31 @@ echo '### --sqlandworker postgresql --results'
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;' 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 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 | /tmp/out--sql/1/1/2/a/stdout | /tmp/out--sql/1/1/2/a/stderr 1 | : |999|999| 0 | 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 | : |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 2 | : |999|999| 0 | 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 | : |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 3 | : |999|999| 0 | 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 | : |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 4 | : |999|999| 0 | 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 | : |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 5 | : |999|999| 0 | 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 | : |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 6 | : |999|999| 0 | 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 | : |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 7 | : |999|999| 0 | 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 | : |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 8 | : |999|999| 0 | 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 | : |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 9 | : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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| : |999|999| 0 | 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| : |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 999| : |999|999| 0 | 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) (999rows)
echo '### --sqlandworker postgresql --linebuffer' echo '### --sqlandworker postgresql --linebuffer'
@ -239,31 +239,31 @@ echo '### --sqlandworker postgresql --linebuffer'
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;' 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 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 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 a | 1 | a | |
2 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | | 2 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 b | 1 | b | |
3 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | | 3 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 c | 1 | c | |
4 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | | 4 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 d | 1 | d | |
5 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | | 5 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 1 e | 1 | e | |
6 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | | 6 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 a | 2 | a | |
7 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | | 7 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 b | 2 | b | |
8 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | | 8 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 c | 2 | c | |
9 | : |999|999| | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | | 9 | : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 d | 2 | d | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 2 e | 2 | e | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 a | 3 | a | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 b | 3 | b | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 c | 3 | c | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 d | 3 | d | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 3 e | 3 | e | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 a | 4 | a | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 b | 4 | b | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 c | 4 | c | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 d | 4 | d | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 4 e | 4 | e | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 a | 5 | a | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 b | 5 | b | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 c | 5 | c | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 d | 5 | d | |
999| : |999|999| | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | | 999| : |999|999| 0 | 4 | 0 | 0 | sleep .3;echo 5 e | 5 | e | |
(999rows) (999rows)
echo '### --sqlandworker postgresql -u' echo '### --sqlandworker postgresql -u'
@ -272,30 +272,30 @@ echo '### --sqlandworker postgresql -u'
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;' 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 seq | host | starttime | jobruntime | send | receive | exitval | _signal | command | v1 | v2 | stdout | stderr
-----+------+----------------+------------+------+---------+---------+---------+-------------------+----+----+--------+-------- -----+------+----------------+------------+------+---------+---------+---------+-------------------+----+----+--------+--------
1 | : |999|999| | | 0 | 0 | sleep .3;echo 1 a | 1 | a | | 1 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 1 a | 1 | a | |
2 | : |999|999| | | 0 | 0 | sleep .3;echo 1 b | 1 | b | | 2 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 1 b | 1 | b | |
3 | : |999|999| | | 0 | 0 | sleep .3;echo 1 c | 1 | c | | 3 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 1 c | 1 | c | |
4 | : |999|999| | | 0 | 0 | sleep .3;echo 1 d | 1 | d | | 4 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 1 d | 1 | d | |
5 | : |999|999| | | 0 | 0 | sleep .3;echo 1 e | 1 | e | | 5 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 1 e | 1 | e | |
6 | : |999|999| | | 0 | 0 | sleep .3;echo 2 a | 2 | a | | 6 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 2 a | 2 | a | |
7 | : |999|999| | | 0 | 0 | sleep .3;echo 2 b | 2 | b | | 7 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 2 b | 2 | b | |
8 | : |999|999| | | 0 | 0 | sleep .3;echo 2 c | 2 | c | | 8 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 2 c | 2 | c | |
9 | : |999|999| | | 0 | 0 | sleep .3;echo 2 d | 2 | d | | 9 | : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 2 d | 2 | d | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 2 e | 2 | e | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 2 e | 2 | e | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 3 a | 3 | a | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 3 a | 3 | a | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 3 b | 3 | b | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 3 b | 3 | b | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 3 c | 3 | c | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 3 c | 3 | c | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 3 d | 3 | d | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 3 d | 3 | d | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 3 e | 3 | e | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 3 e | 3 | e | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 4 a | 4 | a | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 4 a | 4 | a | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 4 b | 4 | b | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 4 b | 4 | b | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 4 c | 4 | c | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 4 c | 4 | c | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 4 d | 4 | d | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 4 d | 4 | d | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 4 e | 4 | e | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 4 e | 4 | e | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 5 a | 5 | a | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 5 a | 5 | a | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 5 b | 5 | b | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 5 b | 5 | b | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 5 c | 5 | c | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 5 c | 5 | c | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 5 d | 5 | d | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 5 d | 5 | d | |
999| : |999|999| | | 0 | 0 | sleep .3;echo 5 e | 5 | e | | 999| : |999|999| 0 | 0 | 0 | 0 | sleep .3;echo 5 e | 5 | e | |
(999rows) (999rows)

View file

@ -147,8 +147,17 @@ ls: No match.
ls: cannot access ./?--.a: No such file or directory ls: cannot access ./?--.a: No such file or directory
ls: No match. ls: No match.
ls: cannot access ./--?.a: No such file or directory ls: cannot access ./--?.a: No such file or directory
echo '### bug #46519: --onall ignores --transfer' echo '### Test --trc "/tmp/./--- /A" "/tmp/./ ---/B"'
### Test --trc "/tmp/./--- /A" "/tmp/./ ---/B"
mkdir -p '/tmp/./--- ' '/tmp/ ---'; touch -- '/tmp/./--- /A' '/tmp/ ---/B'; rm -f ./---?/A.a ./?---/B.a; parallel --trc {=s:.*/./::=}.a -S csh@lo,sh@lo touch ./{=s:.*/./::=}.a ::: '/tmp/./--- /A' '/tmp/./ ---/B'; ls ./---?/A.a ./?---/B.a; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--- ./---? || echo OK'; echo '### bug #46519: --onall ignores --transfer'
./ ---/B.a
./--- /A.a
OK
OK
### bug #46519: --onall ignores --transfer ### bug #46519: --onall ignores --transfer
ls: No match.
ls: cannot access ./?---: No such file or directory
ls: cannot access ./---?: No such file or directory
touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???; parallel --onall --tf bug46519.{} --trc bug46519.{}{} --trc bug46519.{}{}{} -S csh@lo,sh@lo 'ls bug46519.{}; touch bug46519.{}{} bug46519.{}{}{}' ::: a b c; ls bug46519.?? bug46519.???; parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???; parallel --onall --tf bug46519.{} --trc bug46519.{}{} --trc bug46519.{}{}{} -S csh@lo,sh@lo 'ls bug46519.{}; touch bug46519.{}{} bug46519.{}{}{}' ::: a b c; ls bug46519.?? bug46519.???; parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
bug46519.a bug46519.a
bug46519.b bug46519.b

View file

@ -17,7 +17,7 @@ no_warning
warning warning
echo 'env_parallel from man page - transfer non-exported var' echo 'env_parallel from man page - transfer non-exported var'
env_parallel from man page - transfer non-exported var env_parallel from man page - transfer non-exported var
env_parallel() { export parallel_bash_environment="$(echo "shopt -s expand_aliases 2>/dev/null"; alias;typeset -p | grep -vFf <(readonly; echo GROUPS; echo FUNCNAME; echo DIRSTACK; echo _; echo PIPESTATUS; echo USERNAME) | grep -v BASH_;typeset -f)"; `which parallel` "$@"; unset parallel_bash_environment; }; var=nonexported env_parallel -S parallel@lo echo '$var' ::: variable source $(which env_parallel.bash); var=nonexported env_parallel -S parallel@lo echo '$var' ::: variable
nonexported variable nonexported variable
echo 'compared to parallel - no transfer non-exported var' echo 'compared to parallel - no transfer non-exported var'
compared to parallel - no transfer non-exported var compared to parallel - no transfer non-exported var
@ -92,8 +92,10 @@ echo '### and:'
### and: ### and:
echo '### bug #44371: --trc with csh complains' echo '### bug #44371: --trc with csh complains'
### bug #44371: --trc with csh complains ### bug #44371: --trc with csh complains
cd /tmp; echo 1 > file1; echo 2 > file2; parallel -Scsh@lo --trc {1}.a --trc {2}.b 'echo A {1} > {1}.a; echo B {2} > {2}.b' ::: file1 ::: file2; cat file1.a file2.b; rm /tmp/file1 /tmp/file2 /tmp/file1.a /tmp/file2.b cd /tmp; echo 1 > file1; echo 2 > file2; parallel -Scsh@lo --transferfile {1} --transferfile {2} --trc {1}.a --trc {2}.b '(cat {1}; echo A {1}) > {1}.a; (cat {2};echo B {2}) > {2}.b' ::: file1 ::: file2; cat file1.a file2.b; rm /tmp/file1 /tmp/file2 /tmp/file1.a /tmp/file2.b
1
A file1 A file1
2
B file2 B file2
echo '### bug #44143: csh and nice' echo '### bug #44143: csh and nice'
### bug #44143: csh and nice ### bug #44143: csh and nice

View file

@ -51,6 +51,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -g stdout parallel -g
@ -61,6 +62,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -H 1 stdout parallel -H 1
@ -71,6 +73,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -T stdout parallel -T
@ -81,6 +84,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -U foo stdout parallel -U foo
@ -91,6 +95,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -W foo stdout parallel -W foo
@ -101,6 +106,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
stdout parallel -Y stdout parallel -Y
@ -111,6 +117,7 @@ parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd. parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang. parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt. parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired. parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired. parallel: Error: --noctrlc has been retired.
echo '### Test --joblog followed by --resume --joblog' echo '### Test --joblog followed by --resume --joblog'

View file

@ -816,18 +816,50 @@ _
/bin/bash: my_func2: command not found /bin/bash: my_func2: command not found
parallel -vv -S $SERVER1 echo ::: bar parallel -vv -S $SERVER1 echo ::: bar
ssh -l parallel lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";my$eval;$eval=decode_base64(join"",@ARGV);eval$eval;'\' BASE64; ssh -l parallel lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";my$eval=decode_base64(join"",@ARGV);eval$eval;'\' BASE64;
bar bar
my_func3() { my_func3() {
echo in my_func $1 > $1.out echo in my_func $1 > $1.out
} }
export -f my_func3 export -f my_func3
parallel -vv --workdir ... --nice 17 --env _ --trc {}.out -S $SERVER1 my_func3 {} ::: abc-file parallel -vv --workdir ... --nice 17 --env _ --trc {}.out -S $SERVER1 my_func3 {} ::: abc-file
( ssh -l parallel lo -- mkdir -p ./.TMPWORKDIR;rsync --protocol 30 -rlDzR -essh\ -l\ parallel ./abc-file lo:./.TMPWORKDIR );ssh -l parallel lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";my$eval;$eval=decode_base64(join"",@ARGV);eval$eval;'\' BASE64 BASE64;_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ./.TMPWORKDIR/./.\;\ rsync -rlDzR -essh\ -l\ parallel lo:./abc-file.out ./.;ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file.out\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- rm -rf .TMPWORKDIR; exit $_EXIT_status; ( ssh -l parallel lo -- mkdir -p ./.TMPWORKDIR;rsync --protocol 30 -rlDzR -essh\ -l\ parallel ./abc-file lo:./.TMPWORKDIR );ssh -l parallel lo -- exec perl -e \''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";my$eval=decode_base64(join"",@ARGV);eval$eval;'\' BASE64 BASE64;_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ./.TMPWORKDIR/./.\;\ rsync -rlDzR -essh\ -l\ parallel lo:./abc-file.out ./.;ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file.out\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- rm -rf .TMPWORKDIR; exit $_EXIT_status;
parallel --sqlandworker csv:////%2Ftmp%2Flog.csv seq ::: 10 ::: 12 13 14
cat /tmp/log.csv
10
11
12
10
11
12
13
10
11
12
13
14
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,"10
11
12
",
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
11
12
13
",
3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
11
12
13
14
",
vendor://[[user][:password]@][host][:port]/[database[/table] vendor://[[user][:password]@][host][:port]/[database[/table]
/bin/bash: vendor://[[user][:password]@][host][:port]/[database[/table]: No such file or directory /bin/bash: vendor://[[user][:password]@][host][:port]/[database[/table]: No such file or directory
sqlite3:///%2Ftmp%2Fmydatabase/mytable sqlite3:///%2Ftmp%2Fmydatabase/mytable
csv:////%2Ftmp%2Flog.csv
/bin/bash: sqlite3:///%2Ftmp%2Fmydatabase/mytable: No such file or directory /bin/bash: sqlite3:///%2Ftmp%2Fmydatabase/mytable: No such file or directory
/bin/bash: line 1: csv:////%2Ftmp%2Flog.csv: No such file or directory
DBURL=sqlite3:///%2Ftmp%2Fmydatabase DBURL=sqlite3:///%2Ftmp%2Fmydatabase
DBURLTABLE=$DBURL/mytable DBURLTABLE=$DBURL/mytable
parallel --sqlandworker $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlandworker $DBURLTABLE echo ::: foo bar ::: baz quuz
@ -840,7 +872,7 @@ Error:
SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL
sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command]
parallel --sql $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz
parallel: Error: echo is not a valid DBURL parallel: Error: echo is not a valid DBURL
parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz
parallel: Error: echo is not a valid DBURL parallel: Error: echo is not a valid DBURL
@ -1093,7 +1125,6 @@ Arguments
var argv = Environment.GetEnvironmentVariable("ARGV"); var argv = Environment.GetEnvironmentVariable("ARGV");
print("Arguments "+argv); print("Arguments "+argv);
/bin/bash: -c: line 2: syntax error near unexpected token `(' /bin/bash: -c: line 2: syntax error near unexpected token `('
/bin/bash: -c: line 2: ` var argv = Environment.GetEnvironmentVariable("ARGV");' /bin/bash: -c: line 2: ` var argv = Environment.GetEnvironmentVariable("ARGV");'
sem 'sleep 1; echo The first finished' && sem 'sleep 1; echo The first finished' &&