parallel: --group-by --pipepart -n bug.

This commit is contained in:
Ole Tange 2023-05-06 23:42:36 +02:00
parent 3cbbc507ea
commit 61f8b96f43
38 changed files with 3228 additions and 1894 deletions

View file

@ -263,32 +263,39 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm> stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20230422 ('Grand Jury') released Subject: GNU Parallel 20230522 ('Charles<<>>') released
GNU Parallel 20230422 ('Grand Jury') has been released. It is available for download at: lbry://@GnuParallel:4 GNU Parallel 20230522 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4
Quote of the month: Quote of the month:
parallel might be one of the best utilities out there <<>>
-- @ThePrimeagen ThePrimeagen
New in this release: New in this release:
* --jobs evaluates expression: +3*log(55)% = ncpu*1.12 <<>>
* Bug fixes and man page updates. * Bug fixes and man page updates.
News about GNU Parallel: News about GNU Parallel:
* Running shell script in parallel https://w3toppers.com/running-shell-script-in-parallel/ * Introduction to parallel computing https://youtu.be/fvrHXV8yqU4?t=2874
* Simulating climate risk scenarios for the Amazon Rainforest https://aws.amazon.com/blogs/hpc/simulating-climate-risk-scenarios-for-the-amazon-rainforest/ * Script for summarizing GNU parallel joblog file https://github.com/gavinmdouglas/parallel_joblog_summary
* How To Use Your Entire CPU In Bash With Parallel https://bash-prompt.net/guides/parallell-bash/ https://www.cyberciti.biz/faq/linux-unix-copy-a-file-to-multiple-directories-using-cp-command/
https://dev.to/attilavm/search-in-your-jupyter-notebooks-from-the-cli-fast-1408
* Bash - parallel command execution https://medium.com/linuxstories/bash-parallel-command-execution-d4bd7c7cc1d6 https://www.youtube.com/watch?v=2tVpUfND3LI
https://www.youtube.com/watch?v=eC_RPuFCcU8
https://www.youtube.com/watch?v=3vFxDqgcdVI
* 3 tips for faster batch post-pro https://www.cfdengine.com/newsletter/142/ https://www.youtube.com/watch?v=Ke3sirM-aQQ
https://www.youtube.com/watch?v=OXg-WHlB_dk
<<>>
GNU Parallel - For people who live life in the parallel lane. GNU Parallel - For people who live life in the parallel lane.

View file

@ -393,7 +393,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -395,7 +395,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -393,7 +393,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -376,7 +376,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -378,7 +378,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -393,7 +393,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -368,7 +368,7 @@ _parset_main() {
fi fi
if [ "$_parset_NAME" = "--version" ] ; then if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006 # shellcheck disable=SC2006
echo "parset 20230422 (GNU parallel `parallel --minversion 1`)" echo "parset 20230423 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software" echo "Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc." echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>" echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -26,7 +26,7 @@
use strict; use strict;
use Getopt::Long; use Getopt::Long;
$Global::progname="niceload"; $Global::progname="niceload";
$Global::version = 20230422; $Global::version = 20230423;
Getopt::Long::Configure("bundling","require_order"); Getopt::Long::Configure("bundling","require_order");
get_options_from_array(\@ARGV) || die_usage(); get_options_from_array(\@ARGV) || die_usage();
if($opt::version) { if($opt::version) {

View file

@ -742,27 +742,34 @@ sub find_split_positions($$$) {
sub split_positions_for_group_by($$$$) { sub split_positions_for_group_by($$$$) {
my($fh); my($fh);
my %value;
sub value_at($) { sub value_at($) {
my $pos = shift; my $pos = shift;
if($pos != 0) { if(not defined $value{$pos}) {
seek($fh, $pos-1, 0) || die; if($pos != 0) {
# Read half line seek($fh, $pos-1, 0) || die;
<$fh>; # Read half line
} <$fh>;
# Read full line
my $linepos = tell($fh);
$_ = <$fh>;
if(defined $_) {
# Not end of file
my @F;
if(defined $group_by::col) {
$opt::colsep ||= "\t";
@F = split /$opt::colsep/, $_;
$_ = $F[$group_by::col];
} }
eval $group_by::perlexpr; # Read full line
my $linepos = tell($fh);
if(not defined $value{$linepos}) {
$_ = <$fh>;
if(defined $_) {
# Not end of file
my @F;
if(defined $group_by::col) {
$opt::colsep ||= "\t";
@F = split /$opt::colsep/, $_;
$_ = $F[$group_by::col];
}
eval $group_by::perlexpr;
}
$value{$linepos} = [$_,$linepos];
}
$value{$pos} = $value{$linepos};
} }
return ($_,$linepos); return (@{$value{$pos}});
} }
sub binary_search_end($$$) { sub binary_search_end($$$) {
@ -804,48 +811,70 @@ sub split_positions_for_group_by($$$$) {
} }
my ($file,$size,$block,$header,$firstlinelen) = @_; my ($file,$size,$block,$header,$firstlinelen) = @_;
my ($a,$b,$c,$apos,$bpos,$cpos);
my @pos; my @pos;
$fh = open_or_exit($file); $fh = open_or_exit($file);
# Set $Global::group_by_column $Global::group_by_perlexpr # Set $Global::group_by_column $Global::group_by_perlexpr
group_by_loop($fh,$opt::recsep); group_by_loop($fh,$opt::recsep);
# $xpos = linestart, $x = value at $xpos, $apos < $bpos < $cpos if($opt::max_args) {
$apos = $firstlinelen + length $header; # Split after n values
for(($a,$apos) = value_at($apos); $apos < $size;) { my ($a,$apos);
push @pos, $apos; # $xpos = linestart, $x = value at $xpos
$bpos = $apos + $block; $apos = $firstlinelen + length $header;
($b,$bpos) = value_at($bpos); for(($a,$apos) = value_at($apos); $apos < $size;) {
if(eof($fh)) { push @pos, $apos;
push @pos, $size; last; ($a,$apos) = binary_search_end($a,$apos,$size);
} if(eof($fh)) {
$cpos = $bpos + $block; push @pos, $size; last;
($c,$cpos) = value_at($cpos);
if($a eq $b) {
while($b eq $c) {
# Move bpos, cpos a block forward until $a == $b != $c
$bpos = $cpos;
$cpos += $block;
($c,$cpos) = value_at($cpos);
if($cpos >= $size) {
$cpos = $size;
last;
}
} }
# $a == $b != $c }
# Binary search for $b ending between ($bpos,$cpos) # @pos = start of every value
($b,$bpos) = binary_search_end($b,$bpos,$cpos); # Merge n values
} else { # -nX = keep every X'th position
if($b eq $c) { my $i = 0;
# $a != $b == $c @pos = grep { not ($i++ % $opt::max_args) } @pos;
# Binary search for $b starting between ($apos,$bpos) } else {
($b,$bpos) = binary_search_start($b,$apos,$bpos); # Split after any value group
} else { # Preferable < $blocksize
# $a != $b != $c my ($a,$b,$c,$apos,$bpos,$cpos);
# $xpos = linestart, $x = value at $xpos, $apos < $bpos < $cpos
$apos = $firstlinelen + length $header;
for(($a,$apos) = value_at($apos); $apos < $size;) {
push @pos, $apos;
$bpos = $apos + $block;
($b,$bpos) = value_at($bpos);
if(eof($fh)) {
# EOF is less than 1 block away
push @pos, $size; last;
}
$cpos = $bpos + $block;
($c,$cpos) = value_at($cpos);
if($a eq $b) {
while($b eq $c) {
# Move bpos, cpos a block forward until $a == $b != $c
$bpos = $cpos;
$cpos += $block;
($c,$cpos) = value_at($cpos);
if($cpos >= $size) {
$cpos = $size;
last;
}
}
# $a == $b != $c
# Binary search for $b ending between ($bpos,$cpos) # Binary search for $b ending between ($bpos,$cpos)
($b,$bpos) = binary_search_end($b,$bpos,$cpos); ($b,$bpos) = binary_search_end($b,$bpos,$cpos);
} else {
if($b eq $c) {
# $a != $b == $c
# Binary search for $b starting between ($apos,$bpos)
($b,$bpos) = binary_search_start($b,$apos,$bpos);
} else {
# $a != $b != $c
# Binary search for $b ending between ($bpos,$cpos)
($b,$bpos) = binary_search_end($b,$bpos,$cpos);
}
} }
($a,$apos) = ($b,$bpos);
} }
($a,$apos) = ($b,$bpos);
} }
if($pos[$#pos] != $size) { if($pos[$#pos] != $size) {
# Last splitpoint was not at end of the file: add it # Last splitpoint was not at end of the file: add it
@ -1009,7 +1038,7 @@ sub pipe_group_by_setup() {
$sep =~ s/\t/\\t/g; $sep =~ s/\t/\\t/g;
$sep =~ s/\"/\\"/g; $sep =~ s/\"/\\"/g;
# man perlrun: -Fpattern [...] You can't use literal whitespace # man perlrun: -Fpattern [...] You can't use literal whitespace
$sep =~ s/ /\\040{1}/g; $sep =~ s/ /\\040/g;
push @filter, "-F$sep"; push @filter, "-F$sep";
} }
push @filter, "-pe"; push @filter, "-pe";
@ -1432,10 +1461,10 @@ sub index64($$$) {
my $ref = shift; my $ref = shift;
my $match = shift; my $match = shift;
my $pos = shift || 0; my $pos = shift || 0;
my $block_size = 2**31-1; my $max2gb = 2**31-1;
my $strlen = length($$ref); my $strlen = length($$ref);
# No point in doing extra work if we don't need to. # No point in doing extra work if we don't need to.
if($strlen < $block_size or $] > 5.022) { if($strlen < $max2gb or $] > 5.022) {
return index($$ref, $match, $pos); return index($$ref, $match, $pos);
} }
@ -1444,12 +1473,12 @@ sub index64($$$) {
my $offset = $pos; my $offset = $pos;
while($offset < $strlen) { while($offset < $strlen) {
$ret = index( $ret = index(
substr($$ref, $offset, $block_size), substr($$ref, $offset, $max2gb),
$match, $pos-$offset); $match, $pos-$offset);
if($ret != -1) { if($ret != -1) {
return $ret + $offset; return $ret + $offset;
} }
$offset += ($block_size - $matchlen - 1); $offset += ($max2gb - $matchlen - 1);
} }
return -1; return -1;
} }
@ -1646,6 +1675,7 @@ sub bash_competion() {
} }
sub zsh_competion() { sub zsh_competion() {
# Print code used for completion in zsh
my @zsh_completion = my @zsh_completion =
("compdef _comp_parallel parallel; ", ("compdef _comp_parallel parallel; ",
"setopt localoptions extended_glob; ", "setopt localoptions extended_glob; ",
@ -1694,6 +1724,7 @@ sub options_hash() {
my %oh; my %oh;
my ($k,$v); my ($k,$v);
while(($k,$v) = each %och) { while(($k,$v) = each %och) {
# Remove description
$k =~ s/\[.*//; $k =~ s/\[.*//;
$oh{$k} = $v; $oh{$k} = $v;
} }
@ -1953,7 +1984,7 @@ sub options_completion_hash() {
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice # https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt # https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall-of-shame by removing # You accept to be put in a public hall-of-shame by removing
# these lines. # these lines
("bibtex|citation". ("bibtex|citation".
"[Print the citation notice and BibTeX entry for GNU parallel, ". "[Print the citation notice and BibTeX entry for GNU parallel, ".
"silence citation notice for all future runs, and exit. ". "silence citation notice for all future runs, and exit. ".
@ -2114,7 +2145,7 @@ sub get_options_from_array($@) {
# Run GetOptions on @array # Run GetOptions on @array
# Input: # Input:
# $array_ref = ref to @ARGV to parse # $array_ref = ref to @ARGV to parse
# @keep_only = Keep only these options # @keep_only = Keep only these options (e.g. --profile)
# Uses: # Uses:
# @ARGV # @ARGV
# Returns: # Returns:
@ -2195,7 +2226,7 @@ sub parse_options(@) {
# Before changing these line, please read # Before changing these line, please read
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice # https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt # https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be added to a public hall-of-shame by removing the lines. # You accept to be added to a public hall-of-shame by removing the lines
if(defined $opt::citation) { if(defined $opt::citation) {
citation(\@argv_before,\@ARGV); citation(\@argv_before,\@ARGV);
wait_and_exit(0); wait_and_exit(0);
@ -2258,6 +2289,7 @@ sub parse_options(@) {
if(defined $opt::max_args) { if(defined $opt::max_args) {
$opt::max_args = multiply_binary_prefix($opt::max_args); $opt::max_args = multiply_binary_prefix($opt::max_args);
$Global::max_number_of_args = $opt::max_args; $Global::max_number_of_args = $opt::max_args;
if($opt::pipepart and $opt::groupby) { $Global::max_number_of_args = 1; }
} }
if(defined $opt::blocktimeout) { if(defined $opt::blocktimeout) {
$Global::blocktimeout = int(multiply_time_units($opt::blocktimeout)); $Global::blocktimeout = int(multiply_time_units($opt::blocktimeout));
@ -2597,7 +2629,7 @@ sub parse_options(@) {
# the alternatives instead? # the alternatives instead?
# See a list in: 'man parallel_alternatives' # See a list in: 'man parallel_alternatives'
# #
# If you want GNU Parallel to be maintained in the future you # If you want GNU Parallel to be maintained in the future, you
# should keep this line. # should keep this line.
citation_notice(); citation_notice();
# This is because _YOU_ actively make it harder to justify # This is because _YOU_ actively make it harder to justify
@ -2608,7 +2640,7 @@ sub parse_options(@) {
# *YOU* will be harming free software by removing the notice. You # *YOU* will be harming free software by removing the notice. You
# accept to be added to a public hall of shame by removing the # accept to be added to a public hall of shame by removing the
# line. That includes you, Andreas and George. # line. That includes you, George and Andreas.
parse_halt(); parse_halt();
@ -2734,6 +2766,11 @@ sub check_invalid_option_combinations() {
# use --_unsafe to only generate a warning # use --_unsafe to only generate a warning
if($opt::_unsafe) { ::warning(@_); } else { ::error(@_); exit(255); } if($opt::_unsafe) { ::warning(@_); } else { ::error(@_); exit(255); }
} }
if(defined $opt::results) {
if($opt::nonall or $opt::onall) {
unsafe_warn("--(n)onall + --results not supported (yet).");
}
}
sub test_safe_chars { sub test_safe_chars {
my $var = shift; my $var = shift;
if($ENV{$var} =~ m{^[-a-z0-9_+,.%:/= ]*$}i) { if($ENV{$var} =~ m{^[-a-z0-9_+,.%:/= ]*$}i) {
@ -2762,7 +2799,7 @@ sub check_invalid_option_combinations() {
sub init_globals() { sub init_globals() {
# Defaults: # Defaults:
$Global::version = 20230422; $Global::version = 20230423;
$Global::progname = 'parallel'; $Global::progname = 'parallel';
$::name = "GNU Parallel"; $::name = "GNU Parallel";
$Global::infinity = 2**31; $Global::infinity = 2**31;
@ -5718,7 +5755,7 @@ sub usage() {
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice # https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt # https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by removing # You accept to be put in a public hall of shame by removing
# these lines. # these lines
"This helps funding further development; AND IT WON'T COST YOU A CENT.", "This helps funding further development; AND IT WON'T COST YOU A CENT.",
"If you pay 10000 EUR you should feel free to use GNU Parallel without citing.", "If you pay 10000 EUR you should feel free to use GNU Parallel without citing.",
"", "",
@ -5751,7 +5788,7 @@ sub citation_notice() {
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and # https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt # https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by # You accept to be put in a public hall of shame by
# removing these lines. # removing these lines
"This helps funding further development; AND IT WON'T COST YOU A CENT.", "This helps funding further development; AND IT WON'T COST YOU A CENT.",
"If you pay 10000 EUR you should feel free to use GNU Parallel without citing.", "If you pay 10000 EUR you should feel free to use GNU Parallel without citing.",
"", "",
@ -5891,7 +5928,7 @@ sub citation() {
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and # https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt # https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by removing # You accept to be put in a public hall of shame by removing
# these lines. # these lines
"This helps funding further development; AND IT WON'T COST YOU A CENT.", "This helps funding further development; AND IT WON'T COST YOU A CENT.",
"If you pay 10000 EUR you should feel free to use GNU Parallel without citing.", "If you pay 10000 EUR you should feel free to use GNU Parallel without citing.",
"", "",
@ -8254,14 +8291,19 @@ sub user_requested_processes($) {
::wait_and_exit(255); ::wait_and_exit(255);
} }
} else { } else {
# -P +3 and -P -1 if($opt_P eq "0") {
$opt_P =~ s/^([-+])/\$self->ncpus()$1/;
# -P 40%
$opt_P =~ s:%$:*\$self->ncpus()/100:;
$processes = eval $opt_P;
if($processes == 0) {
# -P 0 = infinity (or at least close) # -P 0 = infinity (or at least close)
$processes = $Global::infinity; $processes = $Global::infinity;
} else {
# -P +3 and -P -1
$opt_P =~ s/^([-+])/\$self->ncpus()$1/;
# -P 40%
$opt_P =~ s:%$:*\$self->ncpus()/100:;
$processes = eval $opt_P;
if($processes <= 0) {
# Do not go below 1
$processes = 1;
}
} }
} }
$processes = ::ceil($processes); $processes = ::ceil($processes);

View file

@ -2552,8 +2552,9 @@ command. With B<--round-robin> all blocks will at random be written to
commands already running. This is useful if the command takes a long commands already running. This is useful if the command takes a long
time to initialize. time to initialize.
B<--keep-order> will not work with B<--round-robin> as it is With B<--keep-order> and B<--round-robin> the jobslots will get the
impossible to track which input block corresponds to which output. same blocks as input in the same order in every run if the input is
kept the same. See details under B<--keep-order>.
B<--round-robin> implies B<--pipe>, except if B<--pipe-part> is given. B<--round-robin> implies B<--pipe>, except if B<--pipe-part> is given.
@ -2789,9 +2790,9 @@ I<shardexpr> is [column number|column name] [perlexpression] e.g.:
3 $_%=100 3 $_%=100
Address s/\d//g Address s/\d//g
Each input line is split using B<--colsep>. The value of the column is Each input line is split using B<--colsep>. The string of the column
put into $_, the perl expression is executed, the resulting value is is put into $_, the perl expression is executed, the resulting string
hashed so that all lines of a given value is given to the same job is hashed so that all lines of a given value is given to the same job
slot. slot.
This is similar to sharding in databases. This is similar to sharding in databases.
@ -3670,18 +3671,18 @@ the content except for identifying where a record ends to make sure it
only passes full records. only passes full records.
B<--shard> starts I<n> jobs in total. It parses each line to read the B<--shard> starts I<n> jobs in total. It parses each line to read the
value in the given column. Based on this value the line is passed to string in the given column. Based on this string the line is passed to
one of the I<n> jobs. All lines having this value will be given to the one of the I<n> jobs. All lines having this string will be given to the
same jobslot. same jobslot.
B<--bin> works like B<--shard> but the value of the column is the B<--bin> works like B<--shard> but the value of the column must be
jobslot number it will be passed to. If the value is bigger than I<n>, numeric and is the jobslot number it will be passed to. If the value
then I<n> will be subtracted from the value until the values is is bigger than I<n>, then I<n> will be subtracted from the value until
smaller than or equal to I<n>. the value is smaller than or equal to I<n>.
B<--group-by> starts one job per chunk. Record borders are not given B<--group-by> starts one job per chunk. Record borders are not given
by B<--recend>/B<--recstart>. Instead a record is defined by a number by B<--recend>/B<--recstart>. Instead a record is defined by a group
of lines having the same value in a given column. So the value of a of lines having the same string in a given column. So the string of a
given column changes at a chunk border. With B<--pipe> every line is given column changes at a chunk border. With B<--pipe> every line is
parsed, with B<--pipe-part> only a few lines are parsed to find the parsed, with B<--pipe-part> only a few lines are parsed to find the
chunk border. chunk border.

View file

@ -327,7 +327,8 @@ B<find -exec> only works on files. Processing other input (such as
hosts or URLs) will require creating these inputs as files. B<find hosts or URLs) will require creating these inputs as files. B<find
-exec> has no support for running commands in parallel. -exec> has no support for running commands in parallel.
https://www.gnu.org/software/findutils/ (Last checked: 2019-01) https://www.gnu.org/software/findutils/
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN make -j AND GNU Parallel =head2 DIFFERENCES BETWEEN make -j AND GNU Parallel
@ -360,7 +361,8 @@ by GNU B<parallel> does not depend on each other.
(Very early versions of GNU B<parallel> were coincidentally implemented (Very early versions of GNU B<parallel> were coincidentally implemented
using B<make -j>). using B<make -j>).
https://www.gnu.org/software/make/ (Last checked: 2019-01) https://www.gnu.org/software/make/
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN ppss AND GNU Parallel =head2 DIFFERENCES BETWEEN ppss AND GNU Parallel
@ -459,6 +461,7 @@ using GNU B<parallel>:
9$ killall -SIGUSR2 parallel 9$ killall -SIGUSR2 parallel
https://github.com/louwrentius/PPSS https://github.com/louwrentius/PPSS
(Last checked: 2010-12)
=head2 DIFFERENCES BETWEEN pexec AND GNU Parallel =head2 DIFFERENCES BETWEEN pexec AND GNU Parallel
@ -538,6 +541,7 @@ using GNU B<parallel>:
'pnmscale 0.5 | pnmtojpeg | sem --id diskio cat > th_{}' 'pnmscale 0.5 | pnmtojpeg | sem --id diskio cat > th_{}'
https://www.gnu.org/software/pexec/ https://www.gnu.org/software/pexec/
(Last checked: 2010-12)
=head2 DIFFERENCES BETWEEN xjobs AND GNU Parallel =head2 DIFFERENCES BETWEEN xjobs AND GNU Parallel
@ -583,7 +587,8 @@ using GNU B<parallel>:
echo unzip 1.zip >> /var/run/my_named_pipe; echo unzip 1.zip >> /var/run/my_named_pipe;
echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe
https://www.maier-komor.de/xjobs.html (Last checked: 2019-01) https://www.maier-komor.de/xjobs.html
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN prll AND GNU Parallel =head2 DIFFERENCES BETWEEN prll AND GNU Parallel
@ -608,7 +613,8 @@ using GNU B<parallel>:
1$ parallel mogrify -flip ::: *.jpg 1$ parallel mogrify -flip ::: *.jpg
https://github.com/exzombie/prll (Last checked: 2019-01) https://github.com/exzombie/prll
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN dxargs AND GNU Parallel =head2 DIFFERENCES BETWEEN dxargs AND GNU Parallel
@ -620,7 +626,8 @@ MaxStartups. B<dxargs> is only built for remote run jobs, but does not
support transferring of files. support transferring of files.
https://web.archive.org/web/20120518070250/http://www. https://web.archive.org/web/20120518070250/http://www.
semicomplete.com/blog/geekery/distributed-xargs.html (Last checked: 2019-01) semicomplete.com/blog/geekery/distributed-xargs.html
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN mdm/middleman AND GNU Parallel =head2 DIFFERENCES BETWEEN mdm/middleman AND GNU Parallel
@ -637,7 +644,8 @@ berlios.de/usage.html ported to GNU B<parallel>:
cat files | parallel cmd cat files | parallel cmd
find dir -execdir sem cmd {} \; find dir -execdir sem cmd {} \;
https://github.com/cklin/mdm (Last checked: 2019-01) https://github.com/cklin/mdm
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN xapply AND GNU Parallel =head2 DIFFERENCES BETWEEN xapply AND GNU Parallel
@ -700,7 +708,8 @@ using GNU B<parallel>:
11$ parallel '[ -f {} ] && echo {}' < List | ... 11$ parallel '[ -f {} ] && echo {}' < List | ...
https://www.databits.net/~ksb/msrc/local/bin/xapply/xapply.html https://www.databits.net/~ksb/msrc/local/bin/xapply/xapply.html (Last
checked: 2010-12)
=head2 DIFFERENCES BETWEEN AIX apply AND GNU Parallel =head2 DIFFERENCES BETWEEN AIX apply AND GNU Parallel
@ -738,7 +747,8 @@ the file named a2 to the file named b2, enter:
4$ parallel ln {} /usr/joe ::: * 4$ parallel ln {} /usr/joe ::: *
https://www-01.ibm.com/support/knowledgecenter/ https://www-01.ibm.com/support/knowledgecenter/
ssw_aix_71/com.ibm.aix.cmds1/apply.htm (Last checked: 2019-01) ssw_aix_71/com.ibm.aix.cmds1/apply.htm
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN paexec AND GNU Parallel =head2 DIFFERENCES BETWEEN paexec AND GNU Parallel
@ -791,6 +801,7 @@ using GNU B<parallel>:
parallel echo {} '| awk {print\ toupper\(\$0\)}' <<EOF [...] parallel echo {} '| awk {print\ toupper\(\$0\)}' <<EOF [...]
https://github.com/cheusov/paexec https://github.com/cheusov/paexec
(Last checked: 2010-12)
=head2 DIFFERENCES BETWEEN map(sitaramc) AND GNU Parallel =head2 DIFFERENCES BETWEEN map(sitaramc) AND GNU Parallel
@ -920,7 +931,8 @@ GNU B<parallel>:
8$ export PARALLEL=-j50% 8$ export PARALLEL=-j50%
https://github.com/sitaramc/map (Last checked: 2020-05) https://github.com/sitaramc/map
(Last checked: 2020-05)
=head2 DIFFERENCES BETWEEN ladon AND GNU Parallel =head2 DIFFERENCES BETWEEN ladon AND GNU Parallel
@ -976,7 +988,8 @@ and that it is run under a shell that supports '**' globbing (such as B<zsh>):
4$ parallel lame -V 2 FULLPATH DIRNAME/BASENAME.mp3 ::: ~/Music/*.wav 4$ parallel lame -V 2 FULLPATH DIRNAME/BASENAME.mp3 ::: ~/Music/*.wav
https://github.com/danielgtaylor/ladon (Last checked: 2019-01) https://github.com/danielgtaylor/ladon
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN jobflow AND GNU Parallel =head2 DIFFERENCES BETWEEN jobflow AND GNU Parallel
@ -1053,7 +1066,8 @@ jobs. This can be emulated by GNU B<parallel> using B<bash>'s B<ulimit>:
5$ seq 100 | parallel echo '{= $_>10 and $_<=20 or skip() =}' 5$ seq 100 | parallel echo '{= $_>10 and $_<=20 or skip() =}'
https://github.com/rofl0r/jobflow (Last checked: 2022-05) https://github.com/rofl0r/jobflow
(Last checked: 2022-05)
=head2 DIFFERENCES BETWEEN gargs AND GNU Parallel =head2 DIFFERENCES BETWEEN gargs AND GNU Parallel
@ -1084,6 +1098,7 @@ Output to stderr (standard error) is changed if the command fails.
-P 2 "echo '{1}:{2}-{3}' full-line: \'{}\'" -P 2 "echo '{1}:{2}-{3}' full-line: \'{}\'"
https://github.com/brentp/gargs https://github.com/brentp/gargs
(Last checked: 2016-08)
=head2 DIFFERENCES BETWEEN orgalorg AND GNU Parallel =head2 DIFFERENCES BETWEEN orgalorg AND GNU Parallel
@ -1125,6 +1140,7 @@ B<orgalorg> has a progress indicator for the transferring of a
file. GNU B<parallel> does not. file. GNU B<parallel> does not.
https://github.com/reconquest/orgalorg https://github.com/reconquest/orgalorg
(Last checked: 2016-08)
=head2 DIFFERENCES BETWEEN Rust parallel(mmstick) AND GNU Parallel =head2 DIFFERENCES BETWEEN Rust parallel(mmstick) AND GNU Parallel
@ -1182,6 +1198,7 @@ If /tmp/parallel runs full during the run, Rust parallel does not
report this, but finishes with success - thereby risking data loss. report this, but finishes with success - thereby risking data loss.
https://github.com/mmstick/parallel https://github.com/mmstick/parallel
(Last checked: 2016-08)
=head2 DIFFERENCES BETWEEN Rush AND GNU Parallel =head2 DIFFERENCES BETWEEN Rush AND GNU Parallel
@ -1600,6 +1617,7 @@ The failed commands can be resumed with:
=back =back
https://github.com/shenwei356/rush https://github.com/shenwei356/rush
(Last checked: 2017-05)
=head2 DIFFERENCES BETWEEN ClusterSSH AND GNU Parallel =head2 DIFFERENCES BETWEEN ClusterSSH AND GNU Parallel
@ -1622,6 +1640,7 @@ GNU B<parallel> can be used as a poor-man's version of ClusterSSH:
B<parallel --nonall -S server-a,server-b do_stuff foo bar> B<parallel --nonall -S server-a,server-b do_stuff foo bar>
https://github.com/duncs/clusterssh https://github.com/duncs/clusterssh
(Last checked: 2010-12)
=head2 DIFFERENCES BETWEEN coshell AND GNU Parallel =head2 DIFFERENCES BETWEEN coshell AND GNU Parallel
@ -1636,7 +1655,8 @@ Output can be buffered by using B<-d>. Output is buffered in memory,
so big output can cause swapping and therefore be terrible slow or so big output can cause swapping and therefore be terrible slow or
even cause out of memory. even cause out of memory.
https://github.com/gdm85/coshell (Last checked: 2019-01) https://github.com/gdm85/coshell
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN spread AND GNU Parallel =head2 DIFFERENCES BETWEEN spread AND GNU Parallel
@ -1673,7 +1693,7 @@ and fails on B<pyargs traceroute gnu.org fsf.org>.
seq 5 | pyargs -P50 --mark -L seq seq 5 | pyargs -P50 --mark -L seq
seq 5 | parallel -P50 --lb \ seq 5 | parallel -P50 --lb \
--tagstring OUTPUT'[{= $_=$job->replaced()=}]' seq --tagstring OUTPUT'[{= $_=$job->replaced() =}]' seq
# Similar, but not precisely the same # Similar, but not precisely the same
seq 5 | parallel -P50 --lb --tag seq seq 5 | parallel -P50 --lb --tag seq
@ -1697,7 +1717,8 @@ and fails on B<pyargs traceroute gnu.org fsf.org>.
# Similar, but not exactly the same # Similar, but not exactly the same
parallel seq ::: 1 2 3 4 5 6 parallel seq ::: 1 2 3 4 5 6
https://github.com/robertblackwell/pyargs (Last checked: 2019-01) https://github.com/robertblackwell/pyargs
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN concurrently AND GNU Parallel =head2 DIFFERENCES BETWEEN concurrently AND GNU Parallel
@ -1720,7 +1741,8 @@ There is also no way of controlling how many jobs should be run in
parallel at a time - i.e. "number of jobslots". Instead all jobs are parallel at a time - i.e. "number of jobslots". Instead all jobs are
simply started in parallel. simply started in parallel.
https://github.com/kimmobrunfeldt/concurrently (Last checked: 2019-01) https://github.com/kimmobrunfeldt/concurrently
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN map(soveran) AND GNU Parallel =head2 DIFFERENCES BETWEEN map(soveran) AND GNU Parallel
@ -1776,7 +1798,8 @@ Here are the 5 examples converted to GNU Parallel:
5$ printf "1\n1\n1\n" | parallel -j0 'sleep {} && say done' 5$ printf "1\n1\n1\n" | parallel -j0 'sleep {} && say done'
5$ parallel -j0 'sleep {} && say done' ::: 1 1 1 5$ parallel -j0 'sleep {} && say done' ::: 1 1 1
https://github.com/soveran/map (Last checked: 2019-01) https://github.com/soveran/map
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN loop AND GNU Parallel =head2 DIFFERENCES BETWEEN loop AND GNU Parallel
@ -1960,7 +1983,8 @@ emulated with GNU B<parallel>:
$ loop './do_thing.sh' --every 15s --until-success --num 5 $ loop './do_thing.sh' --every 15s --until-success --num 5
$ parallel --retries 5 --delay 15s ::: ./do_thing.sh $ parallel --retries 5 --delay 15s ::: ./do_thing.sh
https://github.com/Miserlou/Loop/ (Last checked: 2018-10) https://github.com/Miserlou/Loop/
(Last checked: 2018-10)
=head2 DIFFERENCES BETWEEN lorikeet AND GNU Parallel =head2 DIFFERENCES BETWEEN lorikeet AND GNU Parallel
@ -1968,7 +1992,8 @@ https://github.com/Miserlou/Loop/ (Last checked: 2018-10)
B<lorikeet> can run jobs in parallel. It does this based on a B<lorikeet> can run jobs in parallel. It does this based on a
dependency graph described in a file, so this is similar to B<make>. dependency graph described in a file, so this is similar to B<make>.
https://github.com/cetra3/lorikeet (Last checked: 2018-10) https://github.com/cetra3/lorikeet
(Last checked: 2018-10)
=head2 DIFFERENCES BETWEEN spp AND GNU Parallel =head2 DIFFERENCES BETWEEN spp AND GNU Parallel
@ -1977,7 +2002,8 @@ B<spp> can run jobs in parallel. B<spp> does not use a command
template to generate the jobs, but requires jobs to be in a template to generate the jobs, but requires jobs to be in a
file. Output from the jobs mix. file. Output from the jobs mix.
https://github.com/john01dav/spp (Last checked: 2019-01) https://github.com/john01dav/spp
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN paral AND GNU Parallel =head2 DIFFERENCES BETWEEN paral AND GNU Parallel
@ -2046,7 +2072,8 @@ the GNU B<parallel> command):
echo e && sleep 0.5 && echo f && sleep 0.5 && \ echo e && sleep 0.5 && echo f && sleep 0.5 && \
echo g && sleep 0.5 && echo h" echo g && sleep 0.5 && echo h"
https://github.com/amattn/paral (Last checked: 2019-01) https://github.com/amattn/paral
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN concurr AND GNU Parallel =head2 DIFFERENCES BETWEEN concurr AND GNU Parallel
@ -2073,7 +2100,8 @@ The examples from B<README.md>:
B<concurr> deals badly empty input files and with output larger than B<concurr> deals badly empty input files and with output larger than
64 KB. 64 KB.
https://github.com/mmstick/concurr (Last checked: 2019-01) https://github.com/mmstick/concurr
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN lesser-parallel AND GNU Parallel =head2 DIFFERENCES BETWEEN lesser-parallel AND GNU Parallel
@ -2086,7 +2114,8 @@ B<lesser-parallel> implements a few of the replacement strings, but
hardly any options, whereas B<parallel --embed> gives you the full hardly any options, whereas B<parallel --embed> gives you the full
GNU B<parallel> experience. GNU B<parallel> experience.
https://github.com/kou1okada/lesser-parallel (Last checked: 2019-01) https://github.com/kou1okada/lesser-parallel
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN npm-parallel AND GNU Parallel =head2 DIFFERENCES BETWEEN npm-parallel AND GNU Parallel
@ -2096,7 +2125,8 @@ B<npm-parallel> can run npm tasks in parallel.
There are no examples and very little documentation, so it is hard to There are no examples and very little documentation, so it is hard to
compare to GNU B<parallel>. compare to GNU B<parallel>.
https://github.com/spion/npm-parallel (Last checked: 2019-01) https://github.com/spion/npm-parallel
(Last checked: 2019-01)
=head2 DIFFERENCES BETWEEN machma AND GNU Parallel =head2 DIFFERENCES BETWEEN machma AND GNU Parallel
@ -2142,7 +2172,8 @@ The examples from README.md:
parallel --null --bar mogrify -resize 1200x1200 \ parallel --null --bar mogrify -resize 1200x1200 \
-filter Lanczos {} -filter Lanczos {}
https://github.com/fd0/machma (Last checked: 2019-06) https://github.com/fd0/machma
(Last checked: 2019-06)
=head2 DIFFERENCES BETWEEN interlace AND GNU Parallel =head2 DIFFERENCES BETWEEN interlace AND GNU Parallel
@ -2300,14 +2331,16 @@ Run Nikto Using Multiple Proxies
"nikto --host {1}:{2} -useproxy {3} > ./{1}-{2}-nikto.txt" \ "nikto --host {1}:{2} -useproxy {3} > ./{1}-{2}-nikto.txt" \
:::: ./targets.txt ::: 80 443 :::: ./proxies.txt :::: ./targets.txt ::: 80 443 :::: ./proxies.txt
https://github.com/codingo/Interlace (Last checked: 2019-09) https://github.com/codingo/Interlace
(Last checked: 2019-09)
=head2 DIFFERENCES BETWEEN otonvm Parallel AND GNU Parallel =head2 DIFFERENCES BETWEEN otonvm Parallel AND GNU Parallel
I have been unable to get the code to run at all. It seems unfinished. I have been unable to get the code to run at all. It seems unfinished.
https://github.com/otonvm/Parallel (Last checked: 2019-02) https://github.com/otonvm/Parallel
(Last checked: 2019-02)
=head2 DIFFERENCES BETWEEN k-bx par AND GNU Parallel =head2 DIFFERENCES BETWEEN k-bx par AND GNU Parallel
@ -2339,7 +2372,8 @@ corresponding GNU B<parallel> command.
par --succeed "foo" "bar" && echo 'wow' par --succeed "foo" "bar" && echo 'wow'
parallel "foo" "bar"; true && echo 'wow' parallel "foo" "bar"; true && echo 'wow'
https://github.com/k-bx/par (Last checked: 2019-02) https://github.com/k-bx/par
(Last checked: 2019-02)
=head2 DIFFERENCES BETWEEN parallelshell AND GNU Parallel =head2 DIFFERENCES BETWEEN parallelshell AND GNU Parallel
@ -2357,9 +2391,11 @@ line and all commands are started in parallel at the same time. This
will cause the system to freeze if there are so many jobs that there will cause the system to freeze if there are so many jobs that there
is not enough memory to run them all at the same time. is not enough memory to run them all at the same time.
https://github.com/keithamus/parallelshell (Last checked: 2019-02) https://github.com/keithamus/parallelshell
(Last checked: 2019-02)
https://github.com/darkguy2008/parallelshell (Last checked: 2019-03) https://github.com/darkguy2008/parallelshell
(Last checked: 2019-03)
=head2 DIFFERENCES BETWEEN shell-executor AND GNU Parallel =head2 DIFFERENCES BETWEEN shell-executor AND GNU Parallel
@ -2378,7 +2414,8 @@ line and all commands are started in parallel at the same time. This
will cause the system to freeze if there are so many jobs that there will cause the system to freeze if there are so many jobs that there
is not enough memory to run them all at the same time. is not enough memory to run them all at the same time.
https://github.com/royriojas/shell-executor (Last checked: 2019-02) https://github.com/royriojas/shell-executor
(Last checked: 2019-02)
=head2 DIFFERENCES BETWEEN non-GNU par AND GNU Parallel =head2 DIFFERENCES BETWEEN non-GNU par AND GNU Parallel
@ -2398,7 +2435,8 @@ B<parallel> and 60% slower than B<xargs>.
https://github.com/UnixJunkie/PAR https://github.com/UnixJunkie/PAR
https://savannah.nongnu.org/projects/par (Last checked: 2019-02) https://savannah.nongnu.org/projects/par
(Last checked: 2019-02)
=head2 DIFFERENCES BETWEEN fd AND GNU Parallel =head2 DIFFERENCES BETWEEN fd AND GNU Parallel
@ -2410,7 +2448,8 @@ It buffers output in RAM.
It only takes file names from the filesystem as input (similar to B<find>). It only takes file names from the filesystem as input (similar to B<find>).
https://github.com/sharkdp/fd (Last checked: 2019-02) https://github.com/sharkdp/fd
(Last checked: 2019-02)
=head2 DIFFERENCES BETWEEN lateral AND GNU Parallel =head2 DIFFERENCES BETWEEN lateral AND GNU Parallel
@ -2496,7 +2535,8 @@ corresponding GNU B<sem> and GNU B<parallel> commands:
echo 10 >/tmp/njobs echo 10 >/tmp/njobs
wait wait
https://github.com/akramer/lateral (Last checked: 2019-03) https://github.com/akramer/lateral
(Last checked: 2019-03)
=head2 DIFFERENCES BETWEEN with-this AND GNU Parallel =head2 DIFFERENCES BETWEEN with-this AND GNU Parallel
@ -2529,7 +2569,8 @@ commands do not work.
B<with-this> gives some additional information, so the output has to B<with-this> gives some additional information, so the output has to
be cleaned before piping it to the next command. be cleaned before piping it to the next command.
https://github.com/amritb/with-this.git (Last checked: 2019-03) https://github.com/amritb/with-this.git
(Last checked: 2019-03)
=head2 DIFFERENCES BETWEEN Tollef's parallel (moreutils) AND GNU Parallel =head2 DIFFERENCES BETWEEN Tollef's parallel (moreutils) AND GNU Parallel
@ -2642,7 +2683,8 @@ You can then do:
parallel -q --colsep : \ parallel -q --colsep : \
echo -e 'id: "{1}"\t name: "{5}"\t rest: "{=6 $_=join":",@arg[6..$#arg]=}"' echo -e 'id: "{1}"\t name: "{5}"\t rest: "{=6 $_=join":",@arg[6..$#arg]=}"'
https://github.com/lotabout/rargs (Last checked: 2020-01) https://github.com/lotabout/rargs
(Last checked: 2020-01)
=head2 DIFFERENCES BETWEEN threader AND GNU Parallel =head2 DIFFERENCES BETWEEN threader AND GNU Parallel
@ -2674,7 +2716,8 @@ B<threader> ignores stderr, so any output to stderr is
lost. B<threader> buffers in RAM, so output bigger than the machine's lost. B<threader> buffers in RAM, so output bigger than the machine's
virtual memory will cause the machine to crash. virtual memory will cause the machine to crash.
https://github.com/voodooEntity/threader (Last checked: 2020-04) https://github.com/voodooEntity/threader
(Last checked: 2020-04)
=head2 DIFFERENCES BETWEEN runp AND GNU Parallel =head2 DIFFERENCES BETWEEN runp AND GNU Parallel
@ -2812,7 +2855,8 @@ output to stderr (this can be prevented with -q)
parallel netcat -v -w2 -z {=uq=} 2>&1 | parallel netcat -v -w2 -z {=uq=} 2>&1 |
egrep '(succeeded!|open)$' egrep '(succeeded!|open)$'
https://github.com/jreisinger/runp (Last checked: 2020-04) https://github.com/jreisinger/runp
(Last checked: 2020-04)
=head2 DIFFERENCES BETWEEN papply AND GNU Parallel =head2 DIFFERENCES BETWEEN papply AND GNU Parallel
@ -2868,7 +2912,8 @@ seconds (compared to 10 seconds with GNU B<parallel>).
2$ parallel convert {} {.}.jpg ::: *.png 2$ parallel convert {} {.}.jpg ::: *.png
https://pypi.org/project/papply/ (Last checked: 2020-04) https://pypi.org/project/papply/
(Last checked: 2020-04)
=head2 DIFFERENCES BETWEEN async AND GNU Parallel =head2 DIFFERENCES BETWEEN async AND GNU Parallel
@ -2955,7 +3000,8 @@ composed commands.
8$ # GNU Parallel does not need to stop a server 8$ # GNU Parallel does not need to stop a server
https://github.com/ctbur/async/ (Last checked: 2023-01) https://github.com/ctbur/async/
(Last checked: 2023-01)
=head2 DIFFERENCES BETWEEN pardi AND GNU Parallel =head2 DIFFERENCES BETWEEN pardi AND GNU Parallel
@ -3025,7 +3071,8 @@ parallel>).
parallel -k --pipe --block 10k --recend '' --cat \ parallel -k --pipe --block 10k --recend '' --cat \
'cat {} > {#}; cat {#}; rm {#}' > data/decoys2.mol2 'cat {} > {#}; cat {#}; rm {#}' > data/decoys2.mol2
https://github.com/UnixJunkie/pardi (Last checked: 2021-01) https://github.com/UnixJunkie/pardi
(Last checked: 2021-01)
=head2 DIFFERENCES BETWEEN bthread AND GNU Parallel =head2 DIFFERENCES BETWEEN bthread AND GNU Parallel
@ -3054,7 +3101,8 @@ line length is 1073741759.
You cannot quote space in the command, so you cannot run composed You cannot quote space in the command, so you cannot run composed
commands like B<sh -c "echo a; echo b">. commands like B<sh -c "echo a; echo b">.
https://gitlab.com/netikras/bthread (Last checked: 2021-01) https://gitlab.com/netikras/bthread
(Last checked: 2021-01)
=head2 DIFFERENCES BETWEEN simple_gpu_scheduler AND GNU Parallel =head2 DIFFERENCES BETWEEN simple_gpu_scheduler AND GNU Parallel
@ -3119,8 +3167,8 @@ Summary (see legend above):
# Needed to flush output from completed jobs # Needed to flush output from completed jobs
seq 3 | parallel echo true >> gpu.queue seq 3 | parallel echo true >> gpu.queue
https://github.com/ExpectationMax/simple_gpu_scheduler (Last checked: https://github.com/ExpectationMax/simple_gpu_scheduler
2021-01) (Last checked: 2021-01)
=head2 DIFFERENCES BETWEEN parasweep AND GNU Parallel =head2 DIFFERENCES BETWEEN parasweep AND GNU Parallel
@ -3179,7 +3227,8 @@ Filtering is supported as:
parallel --filter '{1} > {2}' echo ::: 1 2 3 ::: 1 2 3 parallel --filter '{1} > {2}' echo ::: 1 2 3 ::: 1 2 3
https://github.com/eviatarbach/parasweep (Last checked: 2021-01) https://github.com/eviatarbach/parasweep
(Last checked: 2021-01)
=head2 DIFFERENCES BETWEEN parallel-bash AND GNU Parallel =head2 DIFFERENCES BETWEEN parallel-bash AND GNU Parallel
@ -3915,12 +3964,130 @@ https://github.com/jkool702/forkrun
(Last checked: 2023-02) (Last checked: 2023-02)
=head2 DIFFERENCES BETWEEN parallel-sh AND GNU Parallel
Summary (see legend above):
=over
=item I1 I2 - I4 - - -
=item M1 - - - - M6
=item O1 O2 O3 - O5 O6 - - - O10
=item E1 - - E4 - - -
=item - - - - - - - - -
=item - -
=back
B<parallel-sh> buffers in RAM. The buffering data takes O(n^1.5) time:
2MB=0.107s 4MB=0.175s 8MB=0.342s 16MB=0.766s 32MB=2.2s 64MB=6.7s
128MB=20s 256MB=64s 512MB=248s 1024MB=998s 2048MB=3756s
It limits the practical usability to jobs outputting < 256 MB. GNU
B<parallel> buffers on disk, yet is faster for jobs with outputs > 16
MB and is only limited by the free space in $TMPDIR.
B<parallel-sh> can kill running jobs if a job fails (Similar to
B<--halt now,fail=1>).
=head3 EXAMPLES
1$ parallel-sh "sleep 2 && echo first" "sleep 1 && echo second"
1$ parallel ::: "sleep 2 && echo first" "sleep 1 && echo second"
2$ cat /tmp/commands
sleep 2 && echo first
sleep 1 && echo second
2$ parallel-sh -f /tmp/commands
2$ parallel -a /tmp/commands
3$ echo -e 'sleep 2 && echo first\nsleep 1 && echo second' |
parallel-sh
3$ echo -e 'sleep 2 && echo first\nsleep 1 && echo second' |
parallel
https://github.com/thyrc/parallel-sh
(Last checked: 2023-04)
=head2 DIFFERENCES BETWEEN bash-parallel AND GNU Parallel
Summary (see legend above):
=over
=item - I2 - - - - I7
=item M1 - M3 - M5 M6
=item - O2 O3 - - O6 - O8 - O10
=item E1 - - - - - -
=item - - - - - - - - -
=item - -
=back
B<bash-parallel> is not as much a command as it is a shell script that
you have to alter. It requires you to change the shell function
process_job that runs the job, and set $MAX_POOL_SIZE to the number of
jobs to run in parallel.
It is half as fast as GNU B<parallel> for short jobs.
https://github.com/thilinaba/bash-parallel
(Last checked: 2023-05)
=head2 DIFFERENCES BETWEEN PaSH AND GNU Parallel
Summary (see legend above): N/A
B<pash> is quite different from GNU B<parallel>. It is not a general
parallelizer. It takes a shell script and analyses it and parallelizes
parts of it by replacing the parts with commands that will give the same
result.
This will replace B<sort> with a command that does pretty much the
same as B<parsort --parallel=8> (except somewhat slower):
pa.sh --width 8 -c 'cat bigfile | sort'
However, even a simple change will confuse B<pash> and you will get no
parallelization:
pa.sh --width 8 -c 'mysort() { sort; }; cat bigfile | mysort'
pa.sh --width 8 -c 'cat bigfile | sort | md5sum'
From the source it seems B<pash> only looks at: awk cat col comm cut
diff grep head mkfifo mv rm sed seq sort tail tee tr uniq wc xargs
For pipelines where these commands are bottlenecks, it might be worth
testing if B<pash> is faster than GNU B<parallel>.
B<pash> does not respect $TMPDIR but always uses /tmp. If B<pash> dies
unexpectantly it does not clean up.
https://github.com/binpash/pash
(Last checked: 2023-05)
=head2 Todo =head2 Todo
https://www.npmjs.com/package/concurrently https://www.npmjs.com/package/concurrently
https://github.com/thilinaba/bash-parallel
http://code.google.com/p/push/ (cannot compile) http://code.google.com/p/push/ (cannot compile)
https://github.com/krashanoff/parallel https://github.com/krashanoff/parallel
@ -3929,8 +4096,6 @@ https://github.com/Nukesor/pueue
https://arxiv.org/pdf/2012.15443.pdf KumQuat https://arxiv.org/pdf/2012.15443.pdf KumQuat
https://arxiv.org/pdf/2007.09436.pdf PaSH: Light-touch Data-Parallel Shell Processing
https://github.com/JeiKeiLim/simple_distribute_job https://github.com/JeiKeiLim/simple_distribute_job
https://github.com/reggi/pkgrun - not obvious how to use https://github.com/reggi/pkgrun - not obvious how to use

View file

@ -137,7 +137,7 @@ GetOptions(
"help" => \$opt::dummy, "help" => \$opt::dummy,
) || exit(255); ) || exit(255);
$Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1]; $Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1];
$Global::version = 20230422; $Global::version = 20230423;
if($opt::version) { version(); exit 0; } if($opt::version) { version(); exit 0; }
# Remove -D and --parallel=N # Remove -D and --parallel=N
my @s = (grep { ! /^-D$|^--parallel=\S+$/ } my @s = (grep { ! /^-D$|^--parallel=\S+$/ }
@ -211,7 +211,7 @@ sub sort_stdin {
# Spread the input between n processes that each sort # Spread the input between n processes that each sort
# n = number of CPU threads # n = number of CPU threads
my $numthreads; my $numthreads;
$numthreads = $opt::parallel || `parallel --number-of-threads`; chomp($numthreads = $opt::parallel || `parallel --number-of-threads`);
my @fifos = map { tmpfifo() } 1..$numthreads; my @fifos = map { tmpfifo() } 1..$numthreads;
map { mkfifo($_,0600) } @fifos; map { mkfifo($_,0600) } @fifos;
# This trick removes the fifo as soon as it is connected in the other end # This trick removes the fifo as soon as it is connected in the other end

View file

@ -670,7 +670,7 @@ $Global::Initfile && unlink $Global::Initfile;
exit ($err); exit ($err);
sub parse_options { sub parse_options {
$Global::version = 20230422; $Global::version = 20230423;
$Global::progname = 'sql'; $Global::progname = 'sql';
# This must be done first as this may exec myself # This must be done first as this may exec myself

View file

@ -59,24 +59,28 @@ run_test() {
(pack "c*",34,39,176..255)."\@<?[]|~\\}{"')" (pack "c*",34,39,176..255)."\@<?[]|~\\}{"')"
semiok_fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n". semiok_fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n".
"\@<?[]|~\\}{"')" "\@<?[]|~\\}{"')"
fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n". fancychars="$(perl -e 'print "\n\`/tmp/trip\`>/tmp/tripwire;\n".
(pack "c*",2..10,34,39)."\@<?[]|~\\"')" (pack "c*",2..10,34,39)."\@<?[]|~\\"')"
export PARALLEL="--_unsafe"; # OK
# fancychars="$(perl -e 'print "\n\`/tmp/trip\`>/tmp/tripwire;\n".
# (pack "c*",2..10,34,39)."\@<?[]|~\\"')"
# OK # OK
# fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n". # fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n".
# (pack "c*",34,39)."\@<?[]|~\\"')" # (pack "c*",34,39)."\@<?[]|~\\"')"
# export PARALLEL="--_unsafe";
# OK # OK
# fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n". # fancychars="$(perl -e 'print "\n\`touch /tmp/tripwire\`>/tmp/tripwire;\n".
# ""')" # ""')"
export TMPDIR=/tmp/"$base-tmp"/"$fancychars"/tmp export TMPDIR=/tmp/"$base-tmp"/"$fancychars"/tmp
export PARALLEL="--_unsafe";
rm -rf "$TMPDIR" rm -rf "$TMPDIR"
mkdir -p "$TMPDIR" mkdir -p "$TMPDIR"
# Clean before. May be owned by other users # Clean before. May be owned by other users
sudo rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} || sudo rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} ||
printf "%s\0" /tmp/*.par | sudo parallel -0 -X rm printf "%s\0" /tmp/*.par | sudo parallel -0 -X rm
rm -f /tmp/tripwire rm -f /tmp/tripwire
printf '#!/bin/bash\ntouch /tmp/tripwire' > /tmp/trip
chmod +x /tmp/trip
# Force running once # Force running once
echo >> actual-results/"$base" echo >> actual-results/"$base"
if [ "$TRIES" = "3" ] ; then if [ "$TRIES" = "3" ] ; then

View file

@ -16,6 +16,29 @@ export -f stdsort
# Test amount of parallelization # Test amount of parallelization
# parallel --shuf --jl /tmp/myjl -j1 'export JOBS={1};'bash tests-to-run/parallel-local-0.3s.sh ::: {1..16} ::: {1..5} # parallel --shuf --jl /tmp/myjl -j1 'export JOBS={1};'bash tests-to-run/parallel-local-0.3s.sh ::: {1..16} ::: {1..5}
par_uninstalled_sshpass() {
echo '### sshpass must be installed for --sshlogin user:pass@host'
sshpass=$(command -v sshpass)
sudo mv "$sshpass" "$sshpass".hidden
parallel -S user:pass@host echo ::: must fail
sudo mv "$sshpass".hidden "$sshpass"
}
par_bug43654() {
echo "bug #43654: --bar with command not using {} - only last output line "
COLUMNS=80 stdout parallel --bar true {.} ::: 1 | perl -pe 's/.*\r/\r/'
}
par_eof_on_command_line_input_source() {
echo '### Test of eof string on :::'
parallel -k -E ole echo ::: foo ole bar
}
par_empty_string_command_line() {
echo '### Test of ignore-empty string on :::'
parallel -k -r echo ::: foo '' ole bar
}
par_ll_no_newline() { par_ll_no_newline() {
echo 'bug #64030: parallel --ll echo -n ::: foo' echo 'bug #64030: parallel --ll echo -n ::: foo'
parallel --ll echo -n ::: two lines | sort parallel --ll echo -n ::: two lines | sort
@ -237,18 +260,6 @@ par_regexp_chars_in_template() {
seq 1 6 | parallel -j1 -I :: -X echo 'a::b::^c::[.}c' seq 1 6 | parallel -j1 -I :: -X echo 'a::b::^c::[.}c'
} }
par_test_m_X() {
echo '### Test -m vs -X'
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
echo '### Test -q {.}'
echo a | parallel -qX echo "'"{.}"' "
echo a | parallel -qX echo "'{.}'"
}
par_i_t() { par_i_t() {
echo '### Test -i' echo '### Test -i'
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce (echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
@ -700,29 +711,6 @@ par_link_files_as_only_arg() {
parallel -k echo ::::+ <(seq 10) <(seq 3) <(seq 4) parallel -k echo ::::+ <(seq 10) <(seq 3) <(seq 4)
} }
par_basic_halt() {
cpuburn=$(mktemp)
cpuburn2=$(mktemp)
(echo '#!/usr/bin/perl'
echo "eval{setpriority(0,0,9)}; while(1){}") > "$cpuburn"
chmod 700 "$cpuburn"
cp -a "$cpuburn" "$cpuburn2"
qcpuburn=$(parallel -0 --shellquote ::: "$cpuburn")
qcpuburn2=$(parallel -0 --shellquote ::: "$cpuburn2")
parallel -0 -j4 --halt 2 ::: 'sleep 1' "$qcpuburn" false;
killall $(basename "$cpuburn") 2>/dev/null &&
echo ERROR: cpuburn should already have been killed
parallel -0 -j4 --halt -2 ::: 'sleep 1' "$qcpuburn2" true;
killall $(basename "$cpuburn2") 2>/dev/null &&
echo ERROR: cpuburn2 should already have been killed
rm "$cpuburn" "$cpuburn2"
parallel --halt error echo ::: should not print
parallel --halt soon echo ::: should not print
parallel --halt now echo ::: should not print
}
par_newline_in_command() { par_newline_in_command() {
echo Command with newline and positional replacement strings echo Command with newline and positional replacement strings
parallel " parallel "
@ -901,20 +889,6 @@ par_results_json() {
perl -pe 's/\d+\.\d{3}/9.999/g' perl -pe 's/\d+\.\d{3}/9.999/g'
} }
par_testquote() {
testquote() {
printf '"#&/\n()*=?'"'" |
PARALLEL_SHELL="$1" parallel -0 echo
}
export -f testquote
# "sash script" does not work
# "sash -f script" does, but is currently not supported by GNU Parallel
parallel --tag -k testquote ::: ash bash csh dash fdsh fish fizsh ksh ksh93 mksh posh rbash rc rzsh "sash -f" sh static-sh tcsh yash zsh
# "fdsh" is currently not supported by GNU Parallel:
# It gives ioctl(): Interrupted system call
parallel --tag -k testquote ::: fdsh
}
par_locale_quoting() { par_locale_quoting() {
echo "### quoting in different locales" echo "### quoting in different locales"
printf '\243`/tmp/test\243`\n' printf '\243`/tmp/test\243`\n'
@ -1014,24 +988,6 @@ par_fish() {
echo OK | stdout fish -c 'parallel --pipe cat' echo OK | stdout fish -c 'parallel --pipe cat'
} }
par_jobslot_jobnumber_pipe() {
echo '### Test bug #43376: {%} and {#} with --pipe'
echo foo | parallel -q --pipe -k echo {#}
echo foo | parallel --pipe -k echo {%}
echo foo | parallel -q --pipe -k echo {%}
echo foo | parallel --pipe -k echo {#}
}
par_replacement_string_as_part_of_command() {
echo '### {} as part of the command'
echo p /bin/ls | parallel l{= s/p/s/ =}
echo /bin/ls-p | parallel --colsep '-' l{=2 s/p/s/ =} {1}
echo s /bin/ls | parallel l{}
echo /bin/ls | parallel ls {}
echo ls /bin/ls | parallel {}
echo ls /bin/ls | parallel
}
par_japanese_chars_in_replacement_string() { par_japanese_chars_in_replacement_string() {
echo '### bug #43817: Some JP char cause problems in positional replacement strings' echo '### bug #43817: Some JP char cause problems in positional replacement strings'
parallel -k echo ::: '<27><<3C>>' '<27><1 $_=2<>>' 'ワ' parallel -k echo ::: '<27><<3C>>' '<27><1 $_=2<>>' 'ワ'

View file

@ -8,7 +8,43 @@
# Each should be taking 10-30s and be possible to run in parallel # Each should be taking 10-30s and be possible to run in parallel
# I.e.: No race conditions, no logins # I.e.: No race conditions, no logins
par_keeporder_roundrobin() { par_retries_0() {
echo '--retries 0 = inf'
echo this wraps at 256 and should retry until it wraps
tmp=$(mktemp)
qtmp=$(parallel -0 --shellquote ::: "$tmp")
parallel --retries 0 -u 'printf {} >> '"$qtmp"';a=$(stat -c %s '"$qtmp"'); echo -n " $a"; exit $a' ::: a
echo
rm -f "$tmp"
}
par_seqreplace_long_line() {
echo '### Test --seqreplace and line too long'
seq 1 1000 |
stdout parallel -j1 -s 210 -k --seqreplace I echo IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII \|wc |
uniq -c
}
par__print_in_blocks() {
echo '### bug #41565: Print happens in blocks - not after each job complete'
median() { perl -e '@a=sort {$a<=>$b} <>;print $a[$#a/2]';}
export -f median
echo 'The timing here is important: a full second between each'
perl -e 'for(1..30){print("$_\n");`sleep 1`}' |
parallel -j3 'echo {#}' |
timestamp -dd |
perl -pe '$_=int($_+0.3)."\n"' |
median
echo '300 ms jobs:'
perl -e 'for(1..30){print("$_\n");`sleep .3`}' |
parallel -j3 --delay 0.3 echo |
timestamp -d -d |
perl -pe 's/(.....).*/int($1*10+0.2)/e' |
median
}
par__keeporder_roundrobin() {
echo 'bug #50081: --keep-order --round-robin should give predictable results' echo 'bug #50081: --keep-order --round-robin should give predictable results'
. `which env_parallel.bash` . `which env_parallel.bash`
@ -38,7 +74,7 @@ par_keeporder_roundrobin() {
fi fi
} }
par_load_from_PARALLEL() { par__load_from_PARALLEL() {
echo "### Test reading load from PARALLEL" echo "### Test reading load from PARALLEL"
export PARALLEL="--load 300%" export PARALLEL="--load 300%"
# Ignore stderr due to 'Starting processes took > 2 sec' # Ignore stderr due to 'Starting processes took > 2 sec'
@ -152,12 +188,16 @@ par_load_blocks() {
grep -Ev 'processes took|Consider adjusting -j' grep -Ev 'processes took|Consider adjusting -j'
} }
par_round_robin_blocks() { par__round_robin_blocks() {
echo "bug #49664: --round-robin does not complete" echo "bug #49664: --round-robin does not complete"
seq 20000000 | parallel -j8 --block 10M --round-robin --pipe wc -c | wc -l seq 20000000 | parallel -j8 --block 10M --round-robin --pipe wc -c | wc -l
} }
par_compress_prg_fails() { par_compress_prg_fails() {
echo "### bug #41609: --compress fails"
seq 12 | parallel --compress --compress-program gzip -k seq {} 10000 | md5sum
seq 12 | parallel --compress -k seq {} 10000 | md5sum
echo '### bug #44546: If --compress-program fails: fail' echo '### bug #44546: If --compress-program fails: fail'
doit() { doit() {
(parallel $* --compress-program false \ (parallel $* --compress-program false \
@ -314,101 +354,6 @@ par_fifo_under_csh() {
doit doit
} }
par_parset() {
echo '### test parset'
(
. `which env_parallel.bash`
echo 'Put output into $myarray'
parset myarray -k seq 10 ::: 14 15 16
echo "${myarray[1]}"
echo 'Put output into vars "$seq, $pwd, $ls"'
parset "seq pwd ls" -k ::: "seq 10" pwd ls
echo "$seq"
echo 'Put output into vars ($seq, $pwd, $ls)':
into_vars=(seq pwd ls)
parset "${into_vars[*]}" -k ::: "seq 5" pwd ls
echo "$seq"
echo 'The commands to run can be an array'
cmd=("echo '<<joe \"double space\" cartoon>>'" "pwd")
parset data -k ::: "${cmd[@]}"
echo "${data[0]}"
echo "${data[1]}"
echo 'You cannot pipe into parset, but must use a tempfile'
seq 10 > /tmp/parset_input_$$
parset res -k echo :::: /tmp/parset_input_$$
echo "${res[0]}"
echo "${res[9]}"
rm /tmp/parset_input_$$
echo 'or process substitution'
parset res -k echo :::: <(seq 0 10)
echo "${res[0]}"
echo "${res[9]}"
echo 'Commands with newline require -0'
parset var -k -0 ::: 'echo "line1
line2"' 'echo "command2"'
echo "${var[0]}"
) | replace_tmpdir
}
par_parset2() {
echo '### parset into array'
(
. `which env_parallel.bash`
parset arr1 echo ::: foo bar baz
echo ${arr1[0]} ${arr1[1]} ${arr1[2]}
echo '### parset into vars with comma'
parset comma3,comma2,comma1 echo ::: baz bar foo
echo $comma1 $comma2 $comma3
echo '### parset into vars with space'
parset 'space3 space2 space1' echo ::: baz bar foo
echo $space1 $space2 $space3
echo '### parset with newlines'
parset 'newline3 newline2 newline1' seq ::: 3 2 1
echo "$newline1"
echo "$newline2"
echo "$newline3"
echo '### parset into indexed array vars'
parset 'myarray[6],myarray[5],myarray[4]' echo ::: baz bar foo
echo ${myarray[*]}
echo ${myarray[4]} ${myarray[5]} ${myarray[5]}
echo '### env_parset'
alias myecho='echo myecho "$myvar" "${myarr[1]}"'
myvar="myvar"
myarr=("myarr 0" "myarr 1" "myarr 2")
mynewline="`echo newline1;echo newline2;`"
env_parset arr1 myecho ::: foo bar baz
echo "${arr1[0]} ${arr1[1]} ${arr1[2]}"
env_parset comma3,comma2,comma1 myecho ::: baz bar foo
echo "$comma1 $comma2 $comma3"
env_parset 'space3 space2 space1' myecho ::: baz bar foo
echo "$space1 $space2 $space3"
env_parset 'newline3 newline2 newline1' 'echo "$mynewline";seq' ::: 3 2 1
echo "$newline1"
echo "$newline2"
echo "$newline3"
env_parset 'myarray[6],myarray[5],myarray[4]' myecho ::: baz bar foo
echo "${myarray[*]}"
echo "${myarray[4]} ${myarray[5]} ${myarray[5]}"
echo 'bug #52507: parset arr1 -v echo ::: fails'
parset arr1 -v seq ::: 1 2 3
echo "${arr1[2]}"
) | replace_tmpdir
}
par_perlexpr_repl() { par_perlexpr_repl() {
echo '### {= and =} in different groups separated by space' echo '### {= and =} in different groups separated by space'
parallel echo {= s/a/b/ =} ::: a parallel echo {= s/a/b/ =} ::: a
@ -591,7 +536,7 @@ par__pipepart_spawn() {
grep 1:local | perl -pe 's/\d\d\d/999/g; s/\d\d+|[2-9]/2+/g;' grep 1:local | perl -pe 's/\d\d\d/999/g; s/\d\d+|[2-9]/2+/g;'
} }
par__pipe_tee() { par_pipe_tee() {
echo 'bug #45479: --pipe/--pipepart --tee' echo 'bug #45479: --pipe/--pipepart --tee'
echo '--pipe --tee' echo '--pipe --tee'
@ -602,7 +547,7 @@ par__pipe_tee() {
random100M | parallel --pipe --tee cat ::: {1..3} | LC_ALL=C wc -c random100M | parallel --pipe --tee cat ::: {1..3} | LC_ALL=C wc -c
} }
par__pipepart_tee() { par_pipepart_tee() {
echo 'bug #45479: --pipe/--pipepart --tee' echo 'bug #45479: --pipe/--pipepart --tee'
echo '--pipepart --tee' echo '--pipepart --tee'
@ -659,12 +604,6 @@ par_maxlinelen_X_I() {
rm /tmp/114-b$$ rm /tmp/114-b$$
} }
par_compress_fail() {
echo "### bug #41609: --compress fails"
seq 12 | parallel --compress --compress-program gzip -k seq {} 10000 | md5sum
seq 12 | parallel --compress -k seq {} 10000 | md5sum
}
par_results_csv() { par_results_csv() {
echo "bug #: --results csv" echo "bug #: --results csv"

View file

@ -8,7 +8,66 @@
# Each should be taking 1-3s and be possible to run in parallel # Each should be taking 1-3s and be possible to run in parallel
# I.e.: No race conditions, no logins # I.e.: No race conditions, no logins
par_plus() { par_tagstring() {
echo '### Test --tagstring'
parallel -j1 -X -v --tagstring a{}b echo ::: 3 4
parallel -j1 -k -v --tagstring a{}b echo ::: 3 4
parallel -j1 -k -v --tagstring a{}b echo job{#} ::: 3 4
parallel -j1 -k -v --tagstring ajob{#}b echo job{#} ::: 3 4
}
par_quote_bugs() {
echo '### Bug did not quote'
echo '>' | parallel -v echo
parallel -v echo ::: '>'
(echo '>'; echo 2) | parallel -j1 -vX echo
parallel -X -j1 echo ::: '>' 2
echo '### Must not quote';
echo 'echo | wc -l' | parallel -v
parallel -v ::: 'echo | wc -l'
echo 'echo a b c | wc -w' | parallel -v
parallel -kv ::: 'echo a b c | wc -w' 'echo a b | wc -w'
}
par_keep_order() {
echo '### Bug made 4 5 go before 1 2 3'
parallel -k ::: "sleep 1; echo 1" "echo 2" "echo 3" "echo 4" "echo 5"
echo '### Bug made 3 go before 1 2'
parallel -kj 1 ::: "sleep 1; echo 1" "echo 2" "echo 3"
}
par__arg_sep() {
echo '### Test basic --arg-sep'
parallel -k echo ::: a b
echo '### Run commands using --arg-sep'
parallel -kv ::: 'echo a' 'echo b'
echo '### Change --arg-sep'
parallel --arg-sep ::: -kv ::: 'echo a' 'echo b'
parallel --arg-sep .--- -kv .--- 'echo a' 'echo b'
parallel --argsep ::: -kv ::: 'echo a' 'echo b'
parallel --argsep .--- -kv .--- 'echo a' 'echo b'
echo '### Test stdin goes to first command only'
echo via cat | parallel --arg-sep .--- -kv .--- 'cat' 'echo b'
echo via cat | parallel -kv ::: 'cat' 'echo b'
}
par_retired() {
echo '### Test retired'
stdout parallel -B foo
stdout parallel -g
stdout parallel -H 1
stdout parallel -T
stdout parallel -U foo
stdout parallel -W foo
stdout parallel -Y
}
par__plus() {
echo '### --plus' echo '### --plus'
echo '(It is OK to start with extra / or end with extra .)' echo '(It is OK to start with extra / or end with extra .)'
parallel -k --plus echo {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = \ parallel -k --plus echo {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = \
@ -149,14 +208,6 @@ par_sqlandworker_uninstalled_dbd() {
parallel --sqlandworker csv:///%2Ftmp%2Fparallel-bug-56096/mytable echo ::: works parallel --sqlandworker csv:///%2Ftmp%2Fparallel-bug-56096/mytable echo ::: works
} }
par_uninstalled_sshpass() {
echo '### sshpass must be installed for --sshlogin user:pass@host'
sshpass=$(command -v sshpass)
sudo mv "$sshpass" "$sshpass".hidden
parallel -S user:pass@host echo ::: must fail
sudo mv "$sshpass".hidden "$sshpass"
}
par_results_compress() { par_results_compress() {
tmpdir="$(mktemp)" tmpdir="$(mktemp)"
rm -r "$tmpdir" rm -r "$tmpdir"
@ -178,7 +229,7 @@ par_results_compress() {
rm -r "$tmpdir" rm -r "$tmpdir"
} }
par_I_X_m() { par__I_X_m() {
echo '### Test -I with -X and -m' echo '### Test -I with -X and -m'
seq 10 | parallel -k 'seq 1 {.} | parallel -k -I :: echo {.} ::' seq 10 | parallel -k 'seq 1 {.} | parallel -k -I :: echo {.} ::'
@ -251,11 +302,6 @@ _EOF
LC_ALL=C sort LC_ALL=C sort
} }
par_bug43654() {
echo "bug #43654: --bar with command not using {} - only last output line "
COLUMNS=80 stdout parallel --bar true {.} ::: 1 | perl -pe 's/.*\r/\r/'
}
par_replacement_rename() { par_replacement_rename() {
echo "### Test --basenamereplace" echo "### Test --basenamereplace"
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b
@ -312,16 +358,6 @@ par_test_gt_quoting() {
(echo '> '; echo '> '; echo '>') | parallel --max-lines 3 echo (echo '> '; echo '> '; echo '>') | parallel --max-lines 3 echo
} }
par_eof_on_command_line_input_source() {
echo '### Test of eof string on :::'
parallel -k -E ole echo ::: foo ole bar
}
par_empty_string_command_line() {
echo '### Test of ignore-empty string on :::'
parallel -k -r echo ::: foo '' ole bar
}
par_trailing_space_line_continuation() { par_trailing_space_line_continuation() {
echo '### Test of trailing space continuation' echo '### Test of trailing space continuation'
(echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 echo (echo foo; echo '';echo 'ole ';echo bar;echo quux) | xargs -r -L2 echo
@ -374,11 +410,71 @@ par_test_job_number() {
seq 1 10 | parallel -k echo {#} seq 1 10 | parallel -k echo {#}
} }
par_seqreplace_long_line() { par_jobslot_jobnumber_pipe() {
echo '### Test --seqreplace and line too long' echo '### Test bug #43376: {%} and {#} with --pipe'
seq 1 1000 | echo foo | parallel -q --pipe -k echo {#}
stdout parallel -j1 -s 210 -k --seqreplace I echo IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII \|wc | echo foo | parallel --pipe -k echo {%}
uniq -c echo foo | parallel -q --pipe -k echo {%}
echo foo | parallel --pipe -k echo {#}
}
par_replacement_string_as_part_of_command() {
echo '### {} as part of the command'
echo p /bin/ls | parallel l{= s/p/s/ =}
echo /bin/ls-p | parallel --colsep '-' l{=2 s/p/s/ =} {1}
echo s /bin/ls | parallel l{}
echo /bin/ls | parallel ls {}
echo ls /bin/ls | parallel {}
echo ls /bin/ls | parallel
}
par_test_m_X() {
echo '### Test -m vs -X'
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
echo '### Test -q {.}'
echo a | parallel -qX echo "'"{.}"' "
echo a | parallel -qX echo "'{.}'"
}
par_testquote() {
testquote() {
printf '"#&/\n()*=?'"'" |
PARALLEL_SHELL="$1" parallel -0 echo
}
export -f testquote
# "sash script" does not work
# "sash -f script" does, but is currently not supported by GNU Parallel
parallel --tag -k testquote ::: ash bash csh dash fdsh fish fizsh ksh ksh93 mksh posh rbash rc rzsh "sash -f" sh static-sh tcsh yash zsh
# "fdsh" is currently not supported by GNU Parallel:
# It gives ioctl(): Interrupted system call
parallel --tag -k testquote ::: fdsh
}
par_basic_halt() {
cpuburn=$(mktemp)
cpuburn2=$(mktemp)
(echo '#!/usr/bin/perl'
echo "eval{setpriority(0,0,9)}; while(1){}") > "$cpuburn"
chmod 700 "$cpuburn"
cp -a "$cpuburn" "$cpuburn2"
qcpuburn=$(parallel -0 --shellquote ::: "$cpuburn")
qcpuburn2=$(parallel -0 --shellquote ::: "$cpuburn2")
parallel -0 -j4 --halt 2 ::: 'sleep 1' "$qcpuburn" false;
killall $(basename "$cpuburn") 2>/dev/null &&
echo ERROR: cpuburn should already have been killed
parallel -0 -j4 --halt -2 ::: 'sleep 1' "$qcpuburn2" true;
killall $(basename "$cpuburn2") 2>/dev/null &&
echo ERROR: cpuburn2 should already have been killed
rm "$cpuburn" "$cpuburn2"
parallel --halt error echo ::: should not print
parallel --halt soon echo ::: should not print
parallel --halt now echo ::: should not print
} }
par_bug37042() { par_bug37042() {
@ -425,7 +521,7 @@ par_pxz_complains() {
stdout parallel --compress --compress-program pxz true ::: OK-if-no-output stdout parallel --compress --compress-program pxz true ::: OK-if-no-output
} }
par_test_XI_mI() { par__test_XI_mI() {
echo "### Test -I" echo "### Test -I"
seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::' seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::'
@ -569,7 +665,7 @@ par_too_long_line_X() {
seq 3000 | parallel -Xj1 'echo {} {} {} {} {} {} {} {} {} {} {} {} {} {} | wc' seq 3000 | parallel -Xj1 'echo {} {} {} {} {} {} {} {} {} {} {} {} {} {} | wc'
} }
par_test_cpu_detection_cpuinfo() { par__test_cpu_detection_cpuinfo() {
pack() { zstd -19 | mmencode; } pack() { zstd -19 | mmencode; }
unpack() { mmencode -u | zstd -d; } unpack() { mmencode -u | zstd -d; }
export -f unpack export -f unpack
@ -854,7 +950,7 @@ par_test_cpu_detection_cpuinfo() {
rm ~/.parallel/tmp/sshlogin/*/cpuspec 2>/dev/null rm ~/.parallel/tmp/sshlogin/*/cpuspec 2>/dev/null
} }
par_test_cpu_detection_lscpu() { par__test_cpu_detection_lscpu() {
pack() { zstd -19 | mmencode; } pack() { zstd -19 | mmencode; }
unpack() { mmencode -u | zstd -d; } unpack() { mmencode -u | zstd -d; }
export -f unpack export -f unpack
@ -1083,7 +1179,7 @@ par_block_negative_prefix() {
rm "$tmp" rm "$tmp"
} }
par_sql_colsep() { par__sql_colsep() {
echo '### SQL should add Vn columns for --colsep' echo '### SQL should add Vn columns for --colsep'
dburl=sqlite3:///%2ftmp%2fparallel-sql-colsep-$$/bar dburl=sqlite3:///%2ftmp%2fparallel-sql-colsep-$$/bar
parallel -k -C' ' --sqlandworker $dburl echo /{1}/{2}/{3}/{4}/ \ parallel -k -C' ' --sqlandworker $dburl echo /{1}/{2}/{3}/{4}/ \

View file

@ -8,6 +8,49 @@
# Each should be taking 30-100s and be possible to run in parallel # Each should be taking 30-100s and be possible to run in parallel
# I.e.: No race conditions, no logins # I.e.: No race conditions, no logins
par__groupby_big() {
echo "### test --group-by on file bigger than block"
groupcol() {
export groupcol=$1
export n=$2
export sorted=$(mktemp)
# Sort on grouping column
parsort -k${groupcol}n "$testfile" > "$sorted"
headtail() { (head -n1;tail -n1); }
export -f headtail
# wrapper functions for -v below to give headers in output
_ppart() { headtail; }
export -f _ppart
_pipe() { headtail; }
export -f _pipe
pipepart() {
parallel $n -k --groupby $groupcol --colsep ' ' -v \
--pipepart -a "$sorted" _ppart
}
pipe() {
parallel $n -k --groupby $groupcol --colsep ' ' -v \
< "$sorted" _pipe
}
export -f pipepart pipe
. $(which env_parallel.bash)
# Do the same with --pipe and --pipepart
parset a,b -k ::: pipe pipepart
paste <(echo "$a") <(echo "$b")
rm "$sorted"
}
export -f groupcol
export testfile=$(mktemp)
# 3 columns: 1..10, 1..100, 1..14
seq 1 1000000 |
awk '{print int(10*rand()),int(100*rand()),int(14*rand())}' > "$testfile"
echo "--group-by on col 1..3, -n1..5"
echo "_pipe and _ppart (pipepart) must return the same"
parallel -k --tag groupcol ::: 1 2 3 ::: '' -n1 -n2 -n3 -n4 -n5
rm "$testfile"
}
par_test_diff_roundrobin_k() { par_test_diff_roundrobin_k() {
echo '### test there is difference on -k' echo '### test there is difference on -k'
. $(which env_parallel.bash) . $(which env_parallel.bash)
@ -281,7 +324,7 @@ par_groupby() {
# Test --colsep --header : (OK: --header : not needed) # Test --colsep --header : (OK: --header : not needed)
} }
par_groupby_pipepart() { par__groupby_pipepart() {
tsv() { tsv() {
# TSV file # TSV file
printf "%s\t" header_a1 head_b1 c1 d1 e1 f1; echo printf "%s\t" header_a1 head_b1 c1 d1 e1 f1; echo
@ -346,7 +389,7 @@ par_race_condition1() {
rm /tmp/parallel_race_cond rm /tmp/parallel_race_cond
} }
par_memory_leak() { par__memory_leak() {
a_run() { a_run() {
seq $1 |time -v parallel true 2>&1 | seq $1 |time -v parallel true 2>&1 |
grep 'Maximum resident' | grep 'Maximum resident' |
@ -457,7 +500,7 @@ par_max_length_len_128k() {
) | perl -pe 's/(\d\d+)\d\d\d/${1}xxx/g' ) | perl -pe 's/(\d\d+)\d\d\d/${1}xxx/g'
} }
par_plus_dyn_repl() { par__plus_dyn_repl() {
echo "Dynamic replacement strings defined by --plus" echo "Dynamic replacement strings defined by --plus"
unset myvar unset myvar

View file

@ -10,25 +10,15 @@
par_process_slot_var() { par_process_slot_var() {
echo '### bug #62310: xargs compatibility: --process-slot-var=name' echo '### bug #62310: xargs compatibility: --process-slot-var=name'
seq 0.1 0.1 0.5 | seq 0.1 0.3 1.5 |
parallel -n1 -P4 --process-slot-var=name -q bash -c 'sleep $1; echo "$name"' _ parallel -n1 -kP4 --process-slot-var=name -q bash -c 'sleep $1; echo "$name"' _
seq 0.1 0.1 0.5 | seq 0.1 0.3 1.5 |
xargs -n1 -P4 --process-slot-var=name bash -c 'sleep $1; echo "$name"' _ xargs -n1 -P4 --process-slot-var=name bash -c 'sleep $1; echo "$name"' _
seq 0.1 0.1 0.5 | seq 0.1 0.3 1.5 |
parallel -P4 --process-slot-var=name sleep {}\; echo '$name' parallel -kP4 --process-slot-var=name sleep {}\; echo '$name'
} }
par_retries_0() { par__prefix_for_L_n_N_s() {
echo '--retries 0 = inf'
echo this wraps at 256 and should retry until it wraps
tmp=$(mktemp)
qtmp=$(parallel -0 --shellquote ::: "$tmp")
parallel --retries 0 -u 'printf {} >> '"$qtmp"';a=$(stat -c %s '"$qtmp"'); echo -n " $a"; exit $a' ::: a
echo
rm -f "$tmp"
}
par_prefix_for_L_n_N_s() {
echo Must give xxx000 args echo Must give xxx000 args
seq 10000 | parallel -N 1k 'echo {} | wc -w' | sort seq 10000 | parallel -N 1k 'echo {} | wc -w' | sort
seq 10000 | parallel -n 1k 'echo {} | wc -w' | sort seq 10000 | parallel -n 1k 'echo {} | wc -w' | sort
@ -38,7 +28,102 @@ par_prefix_for_L_n_N_s() {
seq 10000 | parallel -mj1 -s 1k 'echo {} | wc -w' | sort seq 10000 | parallel -mj1 -s 1k 'echo {} | wc -w' | sort
} }
par_parset_assoc_arr() { par_parset() {
echo '### test parset'
(
. `which env_parallel.bash`
echo 'Put output into $myarray'
parset myarray -k seq 10 ::: 14 15 16
echo "${myarray[1]}"
echo 'Put output into vars "$seq, $pwd, $ls"'
parset "seq pwd ls" -k ::: "seq 10" pwd ls
echo "$seq"
echo 'Put output into vars ($seq, $pwd, $ls)':
into_vars=(seq pwd ls)
parset "${into_vars[*]}" -k ::: "seq 5" pwd ls
echo "$seq"
echo 'The commands to run can be an array'
cmd=("echo '<<joe \"double space\" cartoon>>'" "pwd")
parset data -k ::: "${cmd[@]}"
echo "${data[0]}"
echo "${data[1]}"
echo 'You cannot pipe into parset, but must use a tempfile'
seq 10 > /tmp/parset_input_$$
parset res -k echo :::: /tmp/parset_input_$$
echo "${res[0]}"
echo "${res[9]}"
rm /tmp/parset_input_$$
echo 'or process substitution'
parset res -k echo :::: <(seq 0 10)
echo "${res[0]}"
echo "${res[9]}"
echo 'Commands with newline require -0'
parset var -k -0 ::: 'echo "line1
line2"' 'echo "command2"'
echo "${var[0]}"
) | replace_tmpdir
}
par_parset2() {
echo '### parset into array'
(
. `which env_parallel.bash`
parset arr1 echo ::: foo bar baz
echo ${arr1[0]} ${arr1[1]} ${arr1[2]}
echo '### parset into vars with comma'
parset comma3,comma2,comma1 echo ::: baz bar foo
echo $comma1 $comma2 $comma3
echo '### parset into vars with space'
parset 'space3 space2 space1' echo ::: baz bar foo
echo $space1 $space2 $space3
echo '### parset with newlines'
parset 'newline3 newline2 newline1' seq ::: 3 2 1
echo "$newline1"
echo "$newline2"
echo "$newline3"
echo '### parset into indexed array vars'
parset 'myarray[6],myarray[5],myarray[4]' echo ::: baz bar foo
echo ${myarray[*]}
echo ${myarray[4]} ${myarray[5]} ${myarray[5]}
echo '### env_parset'
alias myecho='echo myecho "$myvar" "${myarr[1]}"'
myvar="myvar"
myarr=("myarr 0" "myarr 1" "myarr 2")
mynewline="`echo newline1;echo newline2;`"
env_parset arr1 myecho ::: foo bar baz
echo "${arr1[0]} ${arr1[1]} ${arr1[2]}"
env_parset comma3,comma2,comma1 myecho ::: baz bar foo
echo "$comma1 $comma2 $comma3"
env_parset 'space3 space2 space1' myecho ::: baz bar foo
echo "$space1 $space2 $space3"
env_parset 'newline3 newline2 newline1' 'echo "$mynewline";seq' ::: 3 2 1
echo "$newline1"
echo "$newline2"
echo "$newline3"
env_parset 'myarray[6],myarray[5],myarray[4]' myecho ::: baz bar foo
echo "${myarray[*]}"
echo "${myarray[4]} ${myarray[5]} ${myarray[5]}"
echo 'bug #52507: parset arr1 -v echo ::: fails'
parset arr1 -v seq ::: 1 2 3
echo "${arr1[2]}"
) | replace_tmpdir
}
par__parset_assoc_arr() {
mytest=$(cat <<'EOF' mytest=$(cat <<'EOF'
mytest() { mytest() {
shell=`basename $SHELL` shell=`basename $SHELL`
@ -226,13 +311,16 @@ par_10000_m_X() {
parallel -k --pipe --tee ::: wc md5sum parallel -k --pipe --tee ::: wc md5sum
} }
par_10000_5_rpl_X() { par__10000_5_rpl_X() {
echo '### Test -X with 10000 args and 5 replacement strings' echo '### Test -X with 10000 args and 5 replacement strings'
seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l gen() {
seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l seq 10000 | perl -pe 's/$/.gif/'
seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l }
seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l gen | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
seq 10000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l gen | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
gen | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
gen | parallel -j1 -kX echo a{}b{.}c | wc -l
gen | parallel -j1 -kX echo a{}b | wc -l
} }
par_X_I_meta() { par_X_I_meta() {
@ -329,7 +417,7 @@ par_tee_with_premature_close() {
rmdir "$tmpdir" rmdir "$tmpdir"
} }
par_tee_too_many_args() { par__tee_too_many_args() {
echo '### Fail if there are more arguments than --jobs' echo '### Fail if there are more arguments than --jobs'
seq 11 | stdout parallel -k --tag --pipe -j4 --tee grep {} ::: {1..4} seq 11 | stdout parallel -k --tag --pipe -j4 --tee grep {} ::: {1..4}
tmp=`mktemp` tmp=`mktemp`
@ -365,7 +453,7 @@ par_totaljob_repl() {
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 -S 8/: -X --plus echo {#} {##} ::: {1..15} parallel -k -S 8/: -X --plus echo {#} {##} ::: {1..15}
parallel -k --plus --delay 0.1 -j 10 'sleep 1; echo {0#}/{##}:{0%}' ::: {1..5} ::: {1..4} parallel -k --plus --delay 0.01 -j 10 'sleep 2; echo {0#}/{##}:{0%}' ::: {1..5} ::: {1..4}
} }
par_jobslot_repl() { par_jobslot_repl() {
@ -379,7 +467,7 @@ par_jobslot_repl() {
echo 'bug #46231: {%} with --pipepart broken. Should give 1+2' echo 'bug #46231: {%} with --pipepart broken. Should give 1+2'
seq 10000 > /tmp/num10000 seq 10000 > /tmp/num10000
parallel -k --pipepart -ka /tmp/num10000 --block 10k -j2 --delay 0.05 'sleep 0.1; echo {%}' parallel -k --pipepart -ka /tmp/num10000 --block 10k -j2 --delay 0.1 'sleep 0.2; echo {%}'
rm /tmp/num10000 rm /tmp/num10000
} }

View file

@ -4,6 +4,13 @@
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
par_change_content_--jobs_filename() {
echo '### Test of -j filename with file content changing (missing -k is correct)'
echo 1 >/tmp/jobs_to_run2
(sleep 3; echo 10 >/tmp/jobs_to_run2) &
parallel -j /tmp/jobs_to_run2 -v sleep {} ::: 3.3 2.{1..5} 0.{1..7}
}
par_csv_not_installed() { par_csv_not_installed() {
echo '### Give error if CSV.pm is not installed when using --csv' echo '### Give error if CSV.pm is not installed when using --csv'
sudo parallel mv {} {}.hidden ::: /usr/share/perl5/Text/CSV.pm sudo parallel mv {} {}.hidden ::: /usr/share/perl5/Text/CSV.pm
@ -63,7 +70,8 @@ par_linebuffer_tag_slow_output() {
} }
par_distribute_input_by_ability() { par_distribute_input_by_ability() {
echo "### bug #48290: round-robin does not distribute data based on business" echo "### bug #48290: round-robin does not distribute data"
echo "based on busy-ness"
echo "### Distribute input to jobs that are ready" echo "### Distribute input to jobs that are ready"
echo "Job-slot n is 50% slower than n+1, so the order should be 1..7" echo "Job-slot n is 50% slower than n+1, so the order should be 1..7"
seq 20000000 | seq 20000000 |

View file

@ -6,6 +6,42 @@
# These fail regularly # These fail regularly
ctrlz_should_suspend_children() {
echo 'bug #46120: Suspend should suspend (at least local) children'
echo 'it should burn 1.9 CPU seconds, but no more than that'
echo 'The 5 second sleep will make it be killed by timeout when it fgs'
run() {
cmd="$1"
sleep="$2"
error="$3"
input_source_pipe() {
echo 1 | stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" | \grep -q CPUTIME=1
}
input_source_cmdline() {
stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" ::: 1 | \grep -q CPUTIME=1
}
# $cmd is input_source_pipe or input_source_cmdline
$cmd &
echo $cmd
sleep $sleep
kill -TSTP -$!
sleep 5
fg
echo $error $?
}
export -f run
clean() {
grep -v '\[1\]' | grep -v 'SHA256'
}
stdout bash -i -c 'run input_source_pipe 1.9 Zero=OK' | clean
stdout bash -i -c 'run input_source_cmdline 1.9 Zero=OK' | clean
echo "Control case: This should run 2.9 seconds"
stdout bash -i -c 'run input_source_cmdline 2.9 1=OK' | clean
}
ctrlz_should_suspend_children
par_semaphore() { par_semaphore() {
echo '### Test if parallel invoked as sem will run parallel --semaphore' echo '### Test if parallel invoked as sem will run parallel --semaphore'
sem --id as_sem -u -j2 'echo job1a 1; sleep 3; echo job1b 3' sem --id as_sem -u -j2 'echo job1a 1; sleep 3; echo job1b 3'
@ -17,34 +53,6 @@ par_semaphore() {
echo done echo done
} }
ctrlz_should_suspend_children() {
echo 'bug #46120: Suspend should suspend (at least local) children'
echo 'it should burn 1.9 CPU seconds, but no more than that'
echo 'The 5 second sleep will make it be killed by timeout when it fgs'
stdout bash -i -c 'stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" ::: 1 | \grep -q CPUTIME=1 &
sleep 1.9;
kill -TSTP -$!;
sleep 5;
fg;
echo Zero=OK $?' | grep -v '\[1\]' | grep -v 'SHA256'
stdout bash -i -c 'echo 1 | stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" | \grep -q CPUTIME=1 &
sleep 1.9;
kill -TSTP -$!;
sleep 5;
fg;
echo Zero=OK $?' | grep -v '\[1\]' | grep -v 'SHA256'
echo Control case: Burn for 2.9 seconds
stdout bash -i -c 'stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" ::: 1 | \grep -q CPUTIME=1 &
sleep 2.9;
kill -TSTP -$!;
sleep 5;
fg;
echo 1=OK $?' | grep -v '\[1\]' | grep -v 'SHA256'
}
ctrlz_should_suspend_children
par_more_than_9_relative_sshlogin() { par_more_than_9_relative_sshlogin() {
echo '### Check more than 9(relative) simultaneous sshlogins' echo '### Check more than 9(relative) simultaneous sshlogins'
seq 1 11 | stdout parallel -k -j10000% -S "ssh lo" echo | seq 1 11 | stdout parallel -k -j10000% -S "ssh lo" echo |
@ -218,4 +226,4 @@ par_continuous_output() {
export -f $(compgen -A function | grep par_) export -f $(compgen -A function | grep par_)
compgen -A function | grep par_ | sort | compgen -A function | grep par_ | sort |
# parallel --joblog /tmp/jl-`basename $0` -j10 --tag -k '{} 2>&1' # parallel --joblog /tmp/jl-`basename $0` -j10 --tag -k '{} 2>&1'
parallel --joblog /tmp/jl-`basename $0` -j1 --tag -k '{} 2>&1' parallel -o --joblog /tmp/jl-`basename $0` -j1 --tag -k '{} 2>&1'

View file

@ -152,7 +152,7 @@ par_bigvar_rc() {
parallel --env A,B,C -k echo '"'"'${}|wc'"'"' ::: A B C' parallel --env A,B,C -k echo '"'"'${}|wc'"'"' ::: A B C'
} }
par_--tmux_different_shells() { par__--tmux_different_shells() {
echo '### Test tmux works on different shells' echo '### Test tmux works on different shells'
short_TMPDIR() { short_TMPDIR() {
# TMPDIR must be short for -M # TMPDIR must be short for -M

View file

@ -7,38 +7,15 @@
mkdir -p tmp mkdir -p tmp
cd tmp cd tmp
median() { perl -e '@a=sort {$a<=>$b} <>;print $a[$#a/2]';}
export -f median
# -L1 will join lines ending in ' ' # -L1 will join lines ending in ' '
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 -r cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 -r
echo '### bug #41565: Print happens in blocks - not after each job complete'
echo 'The timing here is important: a full second between each'
perl -e 'for(1..30){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
echo '300 ms jobs:'
perl -e 'for(1..30){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
echo '### Test --tagstring'
nice parallel -j1 -X -v --tagstring a{}b echo ::: 3 4
nice parallel -j1 -k -v --tagstring a{}b echo ::: 3 4
nice parallel -j1 -k -v --tagstring a{}b echo job{#} ::: 3 4
nice parallel -j1 -k -v --tagstring ajob{#}b echo job{#} ::: 3 4
echo '### Bug in --load'; echo '### Bug in --load';
nice parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3 nice parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3
echo '### Test --timeout' echo '### Test --timeout'
nice parallel -j0 -k --timeout 2 echo {}\; sleep {}\; echo {} ::: 1.1 7.7 8.8 9.9 nice parallel -j0 -k --timeout 2 echo {}\; sleep {}\; echo {} ::: 1.1 7.7 8.8 9.9
echo '### Test retired'
stdout parallel -B foo
stdout parallel -g
stdout parallel -H 1
stdout parallel -T
stdout parallel -U foo
stdout parallel -W foo
stdout parallel -Y
echo '### Test --joblog followed by --resume --joblog' echo '### Test --joblog followed by --resume --joblog'
rm -f /tmp/joblog; rm -f /tmp/joblog;
timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null;
@ -67,39 +44,6 @@ echo "### bug #35268: shell_quote doesn't treats [] brackets correctly"
stdout parallel echo ::: '/tmp/foo[123]'; stdout parallel echo ::: '/tmp/foo[123]';
rm /tmp/foo1 rm /tmp/foo1
echo '### Test basic --arg-sep'
parallel -k echo ::: a b
echo '### Run commands using --arg-sep'
parallel -kv ::: 'echo a' 'echo b'
echo '### Change --arg-sep'
parallel --arg-sep ::: -kv ::: 'echo a' 'echo b'
parallel --arg-sep .--- -kv .--- 'echo a' 'echo b'
parallel --argsep ::: -kv ::: 'echo a' 'echo b'
parallel --argsep .--- -kv .--- 'echo a' 'echo b'
echo '### Test stdin goes to first command only'
echo via cat |parallel --arg-sep .--- -kv .--- 'cat' 'echo b'
echo via cat |parallel -kv ::: 'cat' 'echo b'
echo '### Bug made 4 5 go before 1 2 3'
parallel -k ::: "sleep 1; echo 1" "echo 2" "echo 3" "echo 4" "echo 5"
echo '### Bug made 3 go before 1 2'
parallel -kj 1 ::: "sleep 1; echo 1" "echo 2" "echo 3"
echo '### Bug did not quote'
echo '>' | parallel -v echo
parallel -v echo ::: '>'
(echo '>'; echo 2) | parallel -j1 -vX echo
parallel -X -j1 echo ::: '>' 2
echo '### Must not quote';
echo 'echo | wc -l' | parallel -v
parallel -v ::: 'echo | wc -l'
echo 'echo a b c | wc -w' | parallel -v
parallel -kv ::: 'echo a b c | wc -w' 'echo a b | wc -w'
echo '### Test bug #35820: sem breaks if $HOME is not writable' echo '### Test bug #35820: sem breaks if $HOME is not writable'
echo 'Workaround: use another writable dir'; echo 'Workaround: use another writable dir';

View file

@ -210,7 +210,3 @@ $NICEPAR -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
EOF EOF
echo '### Test of -j filename with file content changing (missing -k is correct)';
echo 1 >/tmp/jobs_to_run2;
(sleep 3; echo 10 >/tmp/jobs_to_run2) &
parallel -j /tmp/jobs_to_run2 -v sleep {} ::: 3.3 1.5 1.5 1.5 1.5 1 1 1 1 1 1 1 1 1 1 1

View file

@ -23,7 +23,8 @@ export SERVER1=parallel@lo
export SERVER2=csh@lo export SERVER2=csh@lo
export PARALLEL=-k export PARALLEL=-k
perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' "$testsuitedir"/../src/parallel_tutorial.pod | perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' "$testsuitedir"/../src/parallel_tutorial.pod |
egrep -v 'curl|tty|parallel_tutorial|interactive|example.(com|net)|shellquote|works' | egrep -v 'curl|tty|parallel_tutorial|interactive|example.(com|net)' |
egrep -v 'shellquote|works|num128|--filter-hosts|--tmux|my_id' |
perl -pe 's/username@//;s/user@//; perl -pe 's/username@//;s/user@//;
s/zenity/zenity --timeout=15/; s/zenity/zenity --timeout=15/;
s:/usr/bin/time:/usr/bin/time -f %e:; s:/usr/bin/time:/usr/bin/time -f %e:;
@ -99,6 +100,7 @@ perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' "$testsuit
s{rsync error: some files/attrs were not transferred .*\n}{}; s{rsync error: some files/attrs were not transferred .*\n}{};
s{Give up after 2 secs\n}{}; s{Give up after 2 secs\n}{};
s{parallel: Warning: Semaphore timed out. Exiting.\n}{}; s{parallel: Warning: Semaphore timed out. Exiting.\n}{};
s{parallel: Starting no more jobs. Waiting for 1 jobs to finish.}{};
s{.* GtkDialog .*\n}{}; s{.* GtkDialog .*\n}{};
s{tried 1}{}; s{tried 1}{};
s/^\s*\n//; s/^\s*\n//;

View file

@ -48,13 +48,6 @@ par_argfile 10
par_arguments_on_cmdline ### Test arguments on commandline par_arguments_on_cmdline ### Test arguments on commandline
par_arguments_on_cmdline args on cmdline par_arguments_on_cmdline args on cmdline
par_arguments_on_cmdline args on cmdline par_arguments_on_cmdline args on cmdline
par_basic_halt parallel: This job failed:
par_basic_halt false
par_basic_halt parallel: This job succeeded:
par_basic_halt true
par_basic_halt parallel: Error: --halt must have 'never', 'soon', or 'now'.
par_basic_halt parallel: Error: --halt soon must be followed by ,success or ,fail.
par_basic_halt parallel: Error: --halt now must be followed by ,success or ,fail.
par_blocking_redir 0 0 0 par_blocking_redir 0 0 0
par_blocking_redir 0 0 0 par_blocking_redir 0 0 0
par_blocking_redir 1 9 54 par_blocking_redir 1 9 54
@ -66,6 +59,8 @@ par_blocking_redir stderr
par_blocking_redir stderr par_blocking_redir stderr
par_blocking_redir stdout par_blocking_redir stdout
par_blocking_redir stdout par_blocking_redir stdout
par_bug43654 bug #43654: --bar with command not using {} - only last output line
par_bug43654 par_bug43654 100% 1:0=0s 1 
par_colour_failed --colour-failed --colour par_colour_failed --colour-failed --colour
par_colour_failed seq 1;exit 0 par_colour_failed seq 1;exit 0
par_colour_failed 1 par_colour_failed 1
@ -216,10 +211,16 @@ par_empty_input_on_stdin This should give no output
par_empty_line ### Test bug: empty line for | sh with -k par_empty_line ### Test bug: empty line for | sh with -k
par_empty_line a par_empty_line a
par_empty_line b par_empty_line b
par_empty_string_command_line ### Test of ignore-empty string on :::
par_empty_string_command_line foo
par_empty_string_command_line ole
par_empty_string_command_line bar
par_empty_string_quote bug #37694: Empty string argument skipped when using --quote par_empty_string_quote bug #37694: Empty string argument skipped when using --quote
par_empty_string_quote 3 par_empty_string_quote 3
par_env_parallel_pipefail ### test env_parallel with pipefail + inherit_errexit par_env_parallel_pipefail ### test env_parallel with pipefail + inherit_errexit
par_env_parallel_pipefail OK par_env_parallel_pipefail OK
par_eof_on_command_line_input_source ### Test of eof string on :::
par_eof_on_command_line_input_source foo
par_exit_val ### Test bug #45619: "--halt" erroneous error exit code (should give 0) par_exit_val ### Test bug #45619: "--halt" erroneous error exit code (should give 0)
par_exit_val 0 par_exit_val 0
par_exit_val ### Test exit val - true par_exit_val ### Test exit val - true
@ -239,9 +240,8 @@ par_group-by_colsep_space ### --colsep " " should work like ","
par_group-by_colsep_space 1 2 5 par_group-by_colsep_space 1 2 5
par_group-by_colsep_space 2 2 10 par_group-by_colsep_space 2 2 10
par_group-by_colsep_space 1 1 6 par_group-by_colsep_space 1 1 6
par_group-by_colsep_space 1 2 5
par_group-by_colsep_space 2 4 10 par_group-by_colsep_space 2 4 10
par_group-by_colsep_space 1 3 6 par_group-by_colsep_space 2 5 11
par_halt_on_error_division_by_zero ### --halt-on-error soon,fail=100% with no input should not give division by zero par_halt_on_error_division_by_zero ### --halt-on-error soon,fail=100% with no input should not give division by zero
par_halt_on_error_division_by_zero 0 par_halt_on_error_division_by_zero 0
par_halt_one_job # Halt soon if there is a single job par_halt_one_job # Halt soon if there is a single job
@ -310,11 +310,6 @@ par_japanese_chars_in_replacement_string <09><1 $_=2<>>
par_japanese_chars_in_replacement_string ワ par_japanese_chars_in_replacement_string ワ
par_japanese_chars_in_replacement_string <09><<3C>> <20><1 $_=2<>> ワ par_japanese_chars_in_replacement_string <09><<3C>> <20><1 $_=2<>> ワ
par_japanese_chars_in_replacement_string <09><<3C>> par_japanese_chars_in_replacement_string <09><<3C>>
par_jobslot_jobnumber_pipe ### Test bug #43376: {%} and {#} with --pipe
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_json { "Seq": 0, "Host": ":", "Starttime": 0000000000.000, "JobRuntime": 0.000, "Send": 0, "Receive": 0, "Exitval": 0, "Signal": 0, "Command": "echo '\"\u0000\\\"' '\"'", "V": [ "\"\u0000\\\","\" ], "Stdout": "\"\u0000\\\" \"\u000a", "Stderr": " } par_json { "Seq": 0, "Host": ":", "Starttime": 0000000000.000, "JobRuntime": 0.000, "Send": 0, "Receive": 0, "Exitval": 0, "Signal": 0, "Command": "echo '\"\u0000\\\"' '\"'", "V": [ "\"\u0000\\\","\" ], "Stdout": "\"\u0000\\\" \"\u000a", "Stderr": " }
par_json { "Seq": 0, "Host": ":", "Starttime": 0000000000.000, "JobRuntime": 0.000, "Send": 0, "Receive": 0, "Exitval": 0, "Signal": 0, "Command": "echo '\"\u0000\\\"' '\\\\'", "V": [ "\"\u0000\\\","\\\\" ], "Stdout": "\"\u0000\\\" \\\\\u000a", "Stderr": " } par_json { "Seq": 0, "Host": ":", "Starttime": 0000000000.000, "JobRuntime": 0.000, "Send": 0, "Receive": 0, "Exitval": 0, "Signal": 0, "Command": "echo '\"\u0000\\\"' '\\\\'", "V": [ "\"\u0000\\\","\\\\" ], "Stdout": "\"\u0000\\\" \\\\\u000a", "Stderr": " }
par_l0_is_l1 ### Because of --tollef -l, then -l0 == -l1, sorry par_l0_is_l1 ### Because of --tollef -l, then -l0 == -l1, sorry
@ -915,13 +910,6 @@ par_regexp_chars_in_template a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b
par_replace_replacementstring ### Test replace {} par_replace_replacementstring ### Test replace {}
par_replace_replacementstring replace curlies par_replace_replacementstring replace curlies
par_replace_replacementstring replace curlies par_replace_replacementstring replace curlies
par_replacement_string_as_part_of_command ### {} as part of the command
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_on_utf8 ### test {} {.} on UTF8 input par_replacement_string_on_utf8 ### test {} {.} on UTF8 input
par_replacement_string_on_utf8 中国 (Zhōngguó)/China's (中国) road.jpg 中国 (Zhōngguó)/China's (中国) road par_replacement_string_on_utf8 中国 (Zhōngguó)/China's (中国) road.jpg 中国 (Zhōngguó)/China's (中国) road
par_replacement_string_on_utf8 中国.(中国) 中国 par_replacement_string_on_utf8 中国.(中国) 中国
@ -1048,14 +1036,6 @@ par_test_L_context_replace a11b a12b a13b a14b a15b a16b a17b a18b a19b
par_test_L_context_replace ### Test -L context replace par_test_L_context_replace ### Test -L context replace
par_test_L_context_replace a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b par_test_L_context_replace a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b
par_test_L_context_replace a11b a12b a13b a14b a15b a16b a17b a18b a19b par_test_L_context_replace a11b a12b a13b a14b a15b a16b a17b a18b a19b
par_test_m_X ### Test -m vs -X
par_test_m_X 1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
par_test_m_X 1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
par_test_m_X a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
par_test_m_X a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
par_test_m_X ### Test -q {.}
par_test_m_X 'a'
par_test_m_X 'a'
par_test_r_with_pipe ### Test of -r with --pipe - the first should give an empty line. The second should not. par_test_r_with_pipe ### Test of -r with --pipe - the first should give an empty line. The second should not.
par_test_r_with_pipe 1 par_test_r_with_pipe 1
par_test_r_with_pipe 0 par_test_r_with_pipe 0
@ -1072,47 +1052,6 @@ par_test_zero_args L0
par_test_zero_args L0 par_test_zero_args L0
par_test_zero_args N0 par_test_zero_args N0
par_test_zero_args N0 par_test_zero_args N0
par_testquote ash "#&/
par_testquote ash ()*=?'
par_testquote bash "#&/
par_testquote bash ()*=?'
par_testquote csh "#&/
par_testquote csh ()*=?'
par_testquote dash "#&/
par_testquote dash ()*=?'
par_testquote fdsh "#&/
par_testquote fdsh ()*=?'
par_testquote fish "#&/
par_testquote fish ()*=?'
par_testquote fizsh "#&/
par_testquote fizsh ()*=?'
par_testquote ksh "#&/
par_testquote ksh ()*=?'
par_testquote ksh93 "#&/
par_testquote ksh93 ()*=?'
par_testquote mksh "#&/
par_testquote mksh ()*=?'
par_testquote posh "#&/
par_testquote posh ()*=?'
par_testquote rbash "#&/
par_testquote rbash ()*=?'
par_testquote rc "#&/
par_testquote rc ()*=?'
par_testquote rzsh "#&/
par_testquote rzsh ()*=?'
par_testquote sash -f parallel: Error: Shell 'sash -f' not found.
par_testquote sh "#&/
par_testquote sh ()*=?'
par_testquote static-sh "#&/
par_testquote static-sh ()*=?'
par_testquote tcsh "#&/
par_testquote tcsh ()*=?'
par_testquote yash "#&/
par_testquote yash ()*=?'
par_testquote zsh "#&/
par_testquote zsh ()*=?'
par_testquote fdsh "#&/
par_testquote fdsh ()*=?'
par_tmpl1 1.t1 /tmp/tmpl-1.1-111.111.t2 par_tmpl1 1.t1 /tmp/tmpl-1.1-111.111.t2
par_tmpl1 Template1 par_tmpl1 Template1
par_tmpl1 Xval: 1.1 par_tmpl1 Xval: 1.1
@ -1362,6 +1301,8 @@ par_tricolonplus 3 23 c bb
par_tricolonplus 3 23 c cc par_tricolonplus 3 23 c cc
par_trim_illegal_value ### Test of --trim illegal par_trim_illegal_value ### Test of --trim illegal
par_trim_illegal_value parallel: Error: --trim must be one of: r l rl lr. par_trim_illegal_value parallel: Error: --trim must be one of: r l rl lr.
par_uninstalled_sshpass ### sshpass must be installed for --sshlogin user:pass@host
par_uninstalled_sshpass parallel: Error: --sshlogin with password requires sshpass installed
par_unquote_replacement_string ### Can part of the replacement string be unquoted using uq()? par_unquote_replacement_string ### Can part of the replacement string be unquoted using uq()?
par_unquote_replacement_string `echo foo`foo par_unquote_replacement_string `echo foo`foo
par_verbose_t ### Test --verbose and -t par_verbose_t ### Test --verbose and -t

View file

@ -16,14 +16,20 @@ par_END include this
par_END include this par_END include this
par_END include this par_END include this
par_END include this par_END include this
par__pipe_tee bug #45479: --pipe/--pipepart --tee par__keeporder_roundrobin bug #50081: --keep-order --round-robin should give predictable results
par__pipe_tee --pipe --tee par__keeporder_roundrobin OK
par__pipe_tee 314572800 par__load_from_PARALLEL ### Test reading load from PARALLEL
par__load_from_PARALLEL 8a7095c1c23bfadc311fe6b16d950582 -
par__load_from_PARALLEL 8a7095c1c23bfadc311fe6b16d950582 -
par__pipepart_spawn ### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922 par__pipepart_spawn ### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922
par__pipepart_spawn 1:local / 2+ / 2+ par__pipepart_spawn 1:local / 2+ / 2+
par__pipepart_tee bug #45479: --pipe/--pipepart --tee par__print_in_blocks ### bug #41565: Print happens in blocks - not after each job complete
par__pipepart_tee --pipepart --tee par__print_in_blocks The timing here is important: a full second between each
par__pipepart_tee 314572800 par__print_in_blocks 1
par__print_in_blocks 300 ms jobs:
par__print_in_blocks 3
par__round_robin_blocks bug #49664: --round-robin does not complete
par__round_robin_blocks 8
par_colsep ### Test of --colsep par_colsep ### Test of --colsep
par_colsep a b c par_colsep a b c
par_colsep a b c par_colsep a b c
@ -72,9 +78,9 @@ par_colsep echo ac
par_colsep ac par_colsep ac
par_colsep echo ac par_colsep echo ac
par_colsep ac par_colsep ac
par_compress_fail ### bug #41609: --compress fails par_compress_prg_fails ### bug #41609: --compress fails
par_compress_fail f1a751b1283e99e7dda40f63f1225f74 - par_compress_prg_fails f1a751b1283e99e7dda40f63f1225f74 -
par_compress_fail f1a751b1283e99e7dda40f63f1225f74 - par_compress_prg_fails f1a751b1283e99e7dda40f63f1225f74 -
par_compress_prg_fails ### bug #44546: If --compress-program fails: fail par_compress_prg_fails ### bug #44546: If --compress-program fails: fail
par_compress_prg_fails 1 par_compress_prg_fails 1
par_compress_prg_fails parallel: Error: false failed. par_compress_prg_fails parallel: Error: false failed.
@ -531,8 +537,6 @@ par_k_linebuffer 20 20
par_k_linebuffer stdout top par_k_linebuffer stdout top
par_k_linebuffer stderr in the middle par_k_linebuffer stderr in the middle
par_k_linebuffer stdout end par_k_linebuffer stdout end
par_keeporder_roundrobin bug #50081: --keep-order --round-robin should give predictable results
par_keeporder_roundrobin OK
par_kill_children_timeout ### Test killing children with --timeout and exit value (failed if timed out) par_kill_children_timeout ### Test killing children with --timeout and exit value (failed if timed out)
par_kill_children_timeout 0 0 0 par_kill_children_timeout 0 0 0
par_kill_children_timeout parallel: Warning: This job was killed because it timed out: par_kill_children_timeout parallel: Warning: This job was killed because it timed out:
@ -609,9 +613,6 @@ par_ll_long_line par_ll_long_line 30xxxxxxxxxxxxxxxxxxxxxxxxxxx>
par_load_blocks ### Test if --load blocks. Bug. par_load_blocks ### Test if --load blocks. Bug.
par_load_blocks 53d025127ae99ab79e8502aae2d9bea6 - par_load_blocks 53d025127ae99ab79e8502aae2d9bea6 -
par_load_blocks 53d025127ae99ab79e8502aae2d9bea6 - par_load_blocks 53d025127ae99ab79e8502aae2d9bea6 -
par_load_from_PARALLEL ### Test reading load from PARALLEL
par_load_from_PARALLEL 8a7095c1c23bfadc311fe6b16d950582 -
par_load_from_PARALLEL 8a7095c1c23bfadc311fe6b16d950582 -
par_long_line_remote ### Deal with long command lines on remote servers par_long_line_remote ### Deal with long command lines on remote servers
par_long_line_remote 1 6 30006 par_long_line_remote 1 6 30006
par_long_line_remote 6 50 250050 par_long_line_remote 6 50 250050
@ -703,82 +704,6 @@ par_opt_arg_eaten 2 OK
par_opt_arg_eaten 3 OK par_opt_arg_eaten 3 OK
par_opt_arg_eaten 4 OK par_opt_arg_eaten 4 OK
par_opt_arg_eaten 5 OK par_opt_arg_eaten 5 OK
par_parset ### test parset
par_parset Put output into $myarray
par_parset 10
par_parset 11
par_parset 12
par_parset 13
par_parset 14
par_parset 15
par_parset Put output into vars "$seq, $pwd, $ls"
par_parset 1
par_parset 2
par_parset 3
par_parset 4
par_parset 5
par_parset 6
par_parset 7
par_parset 8
par_parset 9
par_parset 10
par_parset Put output into vars ($seq, $pwd, $ls):
par_parset 1
par_parset 2
par_parset 3
par_parset 4
par_parset 5
par_parset The commands to run can be an array
par_parset <<joe "double space" cartoon>>
par_parset /TMP
par_parset You cannot pipe into parset, but must use a tempfile
par_parset 1
par_parset 10
par_parset or process substitution
par_parset 0
par_parset 9
par_parset Commands with newline require -0
par_parset line1
par_parset line2
par_parset2 ### parset into array
par_parset2 foo bar baz
par_parset2 ### parset into vars with comma
par_parset2 foo bar baz
par_parset2 ### parset into vars with space
par_parset2 foo bar baz
par_parset2 ### parset with newlines
par_parset2 1
par_parset2 1
par_parset2 2
par_parset2 1
par_parset2 2
par_parset2 3
par_parset2 ### parset into indexed array vars
par_parset2 foo bar baz
par_parset2 foo bar bar
par_parset2 ### env_parset
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 2
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 2
par_parset2 3
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par_parset2 bug #52507: parset arr1 -v echo ::: fails
par_parset2 seq 3
par_parset2 1
par_parset2 2
par_parset2 3
par_perlexpr_repl ### {= and =} in different groups separated by space par_perlexpr_repl ### {= and =} in different groups separated by space
par_perlexpr_repl b par_perlexpr_repl b
par_perlexpr_repl b par_perlexpr_repl b
@ -831,6 +756,12 @@ par_pipe_line_buffer 200 400 1202
par_pipe_line_buffer These must diff: 1 par_pipe_line_buffer These must diff: 1
par_pipe_line_buffer_compress ### --pipe --line-buffer --compress par_pipe_line_buffer_compress ### --pipe --line-buffer --compress
par_pipe_line_buffer_compress 200 400 1202 par_pipe_line_buffer_compress 200 400 1202
par_pipe_tee bug #45479: --pipe/--pipepart --tee
par_pipe_tee --pipe --tee
par_pipe_tee 314572800
par_pipepart_tee bug #45479: --pipe/--pipepart --tee
par_pipepart_tee --pipepart --tee
par_pipepart_tee 314572800
par_quote_special_results ### Test --results on file systems with limited UTF8 support par_quote_special_results ### Test --results on file systems with limited UTF8 support
par_quote_special_results mkfs.btrfs btrfs-progs v5.16.2 par_quote_special_results mkfs.btrfs btrfs-progs v5.16.2
par_quote_special_results mkfs.btrfs See http://btrfs.wiki.kernel.org for more information. par_quote_special_results mkfs.btrfs See http://btrfs.wiki.kernel.org for more information.
@ -1227,6 +1158,9 @@ par_results_csv 8,:,999.999,999.999,0,6,0,0,"echo 23 11",23,11,"23 11
par_results_csv ", par_results_csv ",
par_results_csv 9,:,999.999,999.999,0,6,0,0,"echo 23 12",23,12,"23 12 par_results_csv 9,:,999.999,999.999,0,6,0,0,"echo 23 12",23,12,"23 12
par_results_csv ", par_results_csv ",
par_retries_0 --retries 0 = inf
par_retries_0 this wraps at 256 and should retry until it wraps
par_retries_0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
par_retries_all_fail bug #53748: -k --retries 10 + out of filehandles = blocking par_retries_all_fail bug #53748: -k --retries 10 + out of filehandles = blocking
par_retries_all_fail 1 par_retries_all_fail 1
par_retries_all_fail 2 par_retries_all_fail 2
@ -1236,8 +1170,6 @@ par_retries_all_fail 5
par_retries_all_fail 6 par_retries_all_fail 6
par_retries_all_fail 7 par_retries_all_fail 7
par_retries_all_fail 8 par_retries_all_fail 8
par_round_robin_blocks bug #49664: --round-robin does not complete
par_round_robin_blocks 8
par_sem_2jobs ### Test semaphore 2 jobs running simultaneously par_sem_2jobs ### Test semaphore 2 jobs running simultaneously
par_sem_2jobs job1a 1 par_sem_2jobs job1a 1
par_sem_2jobs job2a 2 par_sem_2jobs job2a 2
@ -1246,6 +1178,10 @@ par_sem_2jobs job3a 4
par_sem_2jobs job2b 5 par_sem_2jobs job2b 5
par_sem_2jobs job3b 6 par_sem_2jobs job3b 6
par_sem_2jobs done par_sem_2jobs done
par_seqreplace_long_line ### Test --seqreplace and line too long
par_seqreplace_long_line 9 1 1 101
par_seqreplace_long_line 90 1 1 201
par_seqreplace_long_line 1 parallel: Error: Command line too long (309 >= 210) at input 0: 100
par_shellquote ### Test --shellquote in all shells par_shellquote ### Test --shellquote in all shells
par_shellquote ash ' par_shellquote ash '
par_shellquote ash par_shellquote ash  !"#$%&'"'"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' par_shellquote ash par_shellquote ash  !"#$%&'"'"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<7F>ƒ„…†‡ˆ‰ŠŒ<E280B9>Ž<EFBFBD><C5BD>“”•˜™šœ<E280BA>žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'

View file

@ -1,79 +1,326 @@
par_I_X_m ### Test -I with -X and -m par__I_X_m ### Test -I with -X and -m
par_I_X_m 1 1 par__I_X_m 1 1
par_I_X_m 2 1 par__I_X_m 2 1
par_I_X_m 2 2 par__I_X_m 2 2
par_I_X_m 3 1 par__I_X_m 3 1
par_I_X_m 3 2 par__I_X_m 3 2
par_I_X_m 3 3 par__I_X_m 3 3
par_I_X_m 4 1 par__I_X_m 4 1
par_I_X_m 4 2 par__I_X_m 4 2
par_I_X_m 4 3 par__I_X_m 4 3
par_I_X_m 4 4 par__I_X_m 4 4
par_I_X_m 5 1 par__I_X_m 5 1
par_I_X_m 5 2 par__I_X_m 5 2
par_I_X_m 5 3 par__I_X_m 5 3
par_I_X_m 5 4 par__I_X_m 5 4
par_I_X_m 5 5 par__I_X_m 5 5
par_I_X_m 6 1 par__I_X_m 6 1
par_I_X_m 6 2 par__I_X_m 6 2
par_I_X_m 6 3 par__I_X_m 6 3
par_I_X_m 6 4 par__I_X_m 6 4
par_I_X_m 6 5 par__I_X_m 6 5
par_I_X_m 6 6 par__I_X_m 6 6
par_I_X_m 7 1 par__I_X_m 7 1
par_I_X_m 7 2 par__I_X_m 7 2
par_I_X_m 7 3 par__I_X_m 7 3
par_I_X_m 7 4 par__I_X_m 7 4
par_I_X_m 7 5 par__I_X_m 7 5
par_I_X_m 7 6 par__I_X_m 7 6
par_I_X_m 7 7 par__I_X_m 7 7
par_I_X_m 8 1 par__I_X_m 8 1
par_I_X_m 8 2 par__I_X_m 8 2
par_I_X_m 8 3 par__I_X_m 8 3
par_I_X_m 8 4 par__I_X_m 8 4
par_I_X_m 8 5 par__I_X_m 8 5
par_I_X_m 8 6 par__I_X_m 8 6
par_I_X_m 8 7 par__I_X_m 8 7
par_I_X_m 8 8 par__I_X_m 8 8
par_I_X_m 9 1 par__I_X_m 9 1
par_I_X_m 9 2 par__I_X_m 9 2
par_I_X_m 9 3 par__I_X_m 9 3
par_I_X_m 9 4 par__I_X_m 9 4
par_I_X_m 9 5 par__I_X_m 9 5
par_I_X_m 9 6 par__I_X_m 9 6
par_I_X_m 9 7 par__I_X_m 9 7
par_I_X_m 9 8 par__I_X_m 9 8
par_I_X_m 9 9 par__I_X_m 9 9
par_I_X_m 10 1 par__I_X_m 10 1
par_I_X_m 10 2 par__I_X_m 10 2
par_I_X_m 10 3 par__I_X_m 10 3
par_I_X_m 10 4 par__I_X_m 10 4
par_I_X_m 10 5 par__I_X_m 10 5
par_I_X_m 10 6 par__I_X_m 10 6
par_I_X_m 10 7 par__I_X_m 10 7
par_I_X_m 10 8 par__I_X_m 10 8
par_I_X_m 10 9 par__I_X_m 10 9
par_I_X_m 10 10 par__I_X_m 10 10
par_I_X_m a1 b1 par__I_X_m a1 b1
par_I_X_m a2 b1 b2 par__I_X_m a2 b1 b2
par_I_X_m a3 b1 b2 b3 par__I_X_m a3 b1 b2 b3
par_I_X_m a4 b1 b2 b3 b4 par__I_X_m a4 b1 b2 b3 b4
par_I_X_m a5 b1 b2 b3 b4 b5 par__I_X_m a5 b1 b2 b3 b4 b5
par_I_X_m a6 b1 b2 b3 b4 b5 b6 par__I_X_m a6 b1 b2 b3 b4 b5 b6
par_I_X_m a7 b1 b2 b3 b4 b5 b6 b7 par__I_X_m a7 b1 b2 b3 b4 b5 b6 b7
par_I_X_m a8 b1 b2 b3 b4 b5 b6 b7 b8 par__I_X_m a8 b1 b2 b3 b4 b5 b6 b7 b8
par_I_X_m a9 b1 b2 b3 b4 b5 b6 b7 b8 b9 par__I_X_m a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
par_I_X_m a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 par__I_X_m a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
par_I_X_m a1 b1 par__I_X_m a1 b1
par_I_X_m a2 b1 2 par__I_X_m a2 b1 2
par_I_X_m a3 b1 2 3 par__I_X_m a3 b1 2 3
par_I_X_m a4 b1 2 3 4 par__I_X_m a4 b1 2 3 4
par_I_X_m a5 b1 2 3 4 5 par__I_X_m a5 b1 2 3 4 5
par_I_X_m a6 b1 2 3 4 5 6 par__I_X_m a6 b1 2 3 4 5 6
par_I_X_m a7 b1 2 3 4 5 6 7 par__I_X_m a7 b1 2 3 4 5 6 7
par_I_X_m a8 b1 2 3 4 5 6 7 8 par__I_X_m a8 b1 2 3 4 5 6 7 8
par_I_X_m a9 b1 2 3 4 5 6 7 8 9 par__I_X_m a9 b1 2 3 4 5 6 7 8 9
par_I_X_m a10 b1 2 3 4 5 6 7 8 9 10 par__I_X_m a10 b1 2 3 4 5 6 7 8 9 10
par__arg_sep ### Test basic --arg-sep
par__arg_sep a
par__arg_sep b
par__arg_sep ### Run commands using --arg-sep
par__arg_sep echo a
par__arg_sep a
par__arg_sep echo b
par__arg_sep b
par__arg_sep ### Change --arg-sep
par__arg_sep echo a
par__arg_sep a
par__arg_sep echo b
par__arg_sep b
par__arg_sep echo a
par__arg_sep a
par__arg_sep echo b
par__arg_sep b
par__arg_sep echo a
par__arg_sep a
par__arg_sep echo b
par__arg_sep b
par__arg_sep echo a
par__arg_sep a
par__arg_sep echo b
par__arg_sep b
par__arg_sep ### Test stdin goes to first command only
par__arg_sep cat
par__arg_sep echo b
par__arg_sep b
par__arg_sep cat
par__arg_sep echo b
par__arg_sep b
par__plus ### --plus
par__plus (It is OK to start with extra / or end with extra .)
par__plus a = /a = a. = /a. = a. = /a. = a. = /a.
par__plus a.b = /a.b = a.b = /a.b = a.b. = /a.b. = a.b. = /a.b.
par__plus a.b.c = /a.b.c = a.b.c = /a.b.c = a.b.c = /a.b.c = a.b.c. = /a.b.c.
par__plus a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d
par__plus a/1 = a/1 = a/1. = a/1. = a/1. = a/1. = a/1. = a/1.
par__plus a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.
par__plus a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3. = a.b.c/1.2.3.
par__plus a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4
par__plus a. = /a. = a. = /a. = a.. = /a.. = a.. = /a..
par__plus a.b. = /a.b. = a.b. = /a.b. = a.b. = /a.b. = a.b.. = /a.b..
par__plus a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c.
par__plus a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d.
par__plus a/1. = a/1. = a/1. = a/1. = a/1.. = a/1.. = a/1.. = a/1..
par__plus a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.. = a.b/1.2..
par__plus a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3.
par__plus a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4.
par__plus a.. = /a.. = a.. = /a.. = a.. = /a.. = a... = /a...
par__plus a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b..
par__plus a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c..
par__plus a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d..
par__plus a./1. = a./1. = a./1. = a./1. = a./1.. = a./1.. = a./1.. = a./1..
par__plus a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2..
par__plus a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3..
par__plus a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4..
par__plus ### Test {%...} {%%...} {#...} {##...}
par__plus z.foo
par__plus z.foo
par__plus foo
par__plus foo
par__plus foo.z
par__plus foo.z
par__plus foo
par__plus foo
par__plus A B C
par__plus A C B
par__plus B A C
par__plus B C A
par__plus C A B
par__plus C B A
par__plus A+B+C
par__plus A+C+B
par__plus B+A+C
par__plus B+C+A
par__plus C+A+B
par__plus C+B+A
par__plus A B C
par__plus A B D
par__plus A C D
par__plus B C D
par__sql_colsep ### SQL should add Vn columns for --colsep
par__sql_colsep /a/A/1/11/
par__sql_colsep /a/A/2/22/
par__sql_colsep /a/A/3/33/
par__sql_colsep /b/B/1/11/
par__sql_colsep /b/B/2/22/
par__sql_colsep /b/B/3/33/
par__sql_colsep /c/C/1/11/
par__sql_colsep /c/C/2/22/
par__sql_colsep /c/C/3/33/
par__sql_colsep /a/A/1/11/
par__sql_colsep /a/A/2/22/
par__sql_colsep /a/A/3/33/
par__sql_colsep /b/B/1/11/
par__sql_colsep /b/B/2/22/
par__sql_colsep /b/B/3/33/
par__sql_colsep /c/C/1/11/
par__sql_colsep /c/C/2/22/
par__sql_colsep /c/C/3/33/
par__sql_colsep a A 1 11 a A 2 22 a A 3 33
par__sql_colsep a A 4 44 a A 5 55 a A 6 66
par__sql_colsep b B 1 11 b B 2 22 b B 3 33
par__sql_colsep b B 4 44 b B 5 55 b B 6 66
par__sql_colsep c C 1 11 c C 2 22 c C 3 33
par__sql_colsep c C 4 44 c C 5 55 c C 6 66
par__sql_colsep a A 1 11 a A 2 22 a A 3 33
par__sql_colsep a A 4 44 a A 5 55 a A 6 66
par__sql_colsep b B 1 11 b B 2 22 b B 3 33
par__sql_colsep b B 4 44 b B 5 55 b B 6 66
par__sql_colsep c C 1 11 c C 2 22 c C 3 33
par__sql_colsep c C 4 44 c C 5 55 c C 6 66
par__test_XI_mI ### Test -I
par__test_XI_mI 1 1
par__test_XI_mI 2 1
par__test_XI_mI 2 2
par__test_XI_mI 3 1
par__test_XI_mI 3 2
par__test_XI_mI 3 3
par__test_XI_mI 4 1
par__test_XI_mI 4 2
par__test_XI_mI 4 3
par__test_XI_mI 4 4
par__test_XI_mI 5 1
par__test_XI_mI 5 2
par__test_XI_mI 5 3
par__test_XI_mI 5 4
par__test_XI_mI 5 5
par__test_XI_mI 6 1
par__test_XI_mI 6 2
par__test_XI_mI 6 3
par__test_XI_mI 6 4
par__test_XI_mI 6 5
par__test_XI_mI 6 6
par__test_XI_mI 7 1
par__test_XI_mI 7 2
par__test_XI_mI 7 3
par__test_XI_mI 7 4
par__test_XI_mI 7 5
par__test_XI_mI 7 6
par__test_XI_mI 7 7
par__test_XI_mI 8 1
par__test_XI_mI 8 2
par__test_XI_mI 8 3
par__test_XI_mI 8 4
par__test_XI_mI 8 5
par__test_XI_mI 8 6
par__test_XI_mI 8 7
par__test_XI_mI 8 8
par__test_XI_mI 9 1
par__test_XI_mI 9 2
par__test_XI_mI 9 3
par__test_XI_mI 9 4
par__test_XI_mI 9 5
par__test_XI_mI 9 6
par__test_XI_mI 9 7
par__test_XI_mI 9 8
par__test_XI_mI 9 9
par__test_XI_mI 10 1
par__test_XI_mI 10 2
par__test_XI_mI 10 3
par__test_XI_mI 10 4
par__test_XI_mI 10 5
par__test_XI_mI 10 6
par__test_XI_mI 10 7
par__test_XI_mI 10 8
par__test_XI_mI 10 9
par__test_XI_mI 10 10
par__test_XI_mI ### Test -X -I
par__test_XI_mI a1 b1
par__test_XI_mI a2 b1 b2
par__test_XI_mI a3 b1 b2 b3
par__test_XI_mI a4 b1 b2 b3 b4
par__test_XI_mI a5 b1 b2 b3 b4 b5
par__test_XI_mI a6 b1 b2 b3 b4 b5 b6
par__test_XI_mI a7 b1 b2 b3 b4 b5 b6 b7
par__test_XI_mI a8 b1 b2 b3 b4 b5 b6 b7 b8
par__test_XI_mI a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
par__test_XI_mI a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
par__test_XI_mI ### Test -m -I
par__test_XI_mI a1 b1
par__test_XI_mI a2 b1 2
par__test_XI_mI a3 b1 2 3
par__test_XI_mI a4 b1 2 3 4
par__test_XI_mI a5 b1 2 3 4 5
par__test_XI_mI a6 b1 2 3 4 5 6
par__test_XI_mI a7 b1 2 3 4 5 6 7
par__test_XI_mI a8 b1 2 3 4 5 6 7 8
par__test_XI_mI a9 b1 2 3 4 5 6 7 8 9
par__test_XI_mI a10 b1 2 3 4 5 6 7 8 9 10
par__test_cpu_detection_cpuinfo 2-8-8-8 Xeon 8 core server in Germany
par__test_cpu_detection_cpuinfo 2 8 8 8
par__test_cpu_detection_cpuinfo 4-48-48-48 Dell R815 4 CPU 48-core
par__test_cpu_detection_cpuinfo 4 24 48 24
par__test_cpu_detection_cpuinfo 1-4-8-4 4-core/8 thread Lenovo T480
par__test_cpu_detection_cpuinfo 1 4 8 4
par__test_cpu_detection_cpuinfo 4-64-64-64 Dell R815 4 CPU 64-core
par__test_cpu_detection_cpuinfo 4 32 64 32
par__test_cpu_detection_cpuinfo 1-2-2-2 AMD Neo N36L Dual-Core Processor
par__test_cpu_detection_cpuinfo 1 2 2 2
par__test_cpu_detection_cpuinfo 1-1-1-1 Intel Xeon X5675 (mandriva.p)
par__test_cpu_detection_cpuinfo 1 1 1 1
par__test_cpu_detection_cpuinfo 1-1-1-1 Intel(R) Celeron(R) M (eee900)
par__test_cpu_detection_cpuinfo 1 1 1 1
par__test_cpu_detection_cpuinfo 1-4-8-4 Core i7-3632QM Acer laptop
par__test_cpu_detection_cpuinfo 1 4 8 4
par__test_cpu_detection_cpuinfo 1-2-4-2 Core i5-2410M laptop firewall
par__test_cpu_detection_cpuinfo 1 2 4 2
par__test_cpu_detection_cpuinfo 1-2-2-2 AMD Opteron 244 dual core laptop(?)
par__test_cpu_detection_cpuinfo 1 2 2 2
par__test_cpu_detection_cpuinfo 2-24-48-24 24-core (maxwell?)
par__test_cpu_detection_cpuinfo 2 24 48 24
par__test_cpu_detection_cpuinfo 1-2-2-2 HP Laptop Compaq 6530b
par__test_cpu_detection_cpuinfo 1 2 2 2
par__test_cpu_detection_cpuinfo 1-8-8-8 Huawei P Smart Octa-core (4x2.36 GHz Cortex-A53 & 4x1.7 GHz Cortex-A53)
par__test_cpu_detection_cpuinfo 1 8 8 8
par__test_cpu_detection_cpuinfo 1-4-4-4 x96 quad-core Android TV-box
par__test_cpu_detection_cpuinfo 1 4 4 4
par__test_cpu_detection_cpuinfo 1-6-6-6 Kramses 200 USD laptop 6-core
par__test_cpu_detection_cpuinfo 1 6 6 6
par__test_cpu_detection_lscpu 2-8-8-8 Xeon 8 core server in Germany
par__test_cpu_detection_lscpu 2 8 8 8
par__test_cpu_detection_lscpu 4-64-64-64 Dell R815 4 CPU 64-core
par__test_cpu_detection_lscpu 4 8 8 8
par__test_cpu_detection_lscpu 1-2-2-2 AMD Neo N36L Dual-Core Processor
par__test_cpu_detection_lscpu 1 2 2 2
par__test_cpu_detection_lscpu 1-1-1-1 Intel Xeon X5675 (mandriva.p)
par__test_cpu_detection_lscpu 1 1 1 1
par__test_cpu_detection_lscpu 1-1-1-1 Intel(R) Celeron(R) M (eee900)
par__test_cpu_detection_lscpu 1 1 1 1
par__test_cpu_detection_lscpu 1-4-8-4 Core i7-3632QM Acer laptop
par__test_cpu_detection_lscpu 1 4 8 4
par__test_cpu_detection_lscpu 1-2-4-2 Core i5-2410M laptop firewall
par__test_cpu_detection_lscpu 1 2 4 2
par__test_cpu_detection_lscpu 1-8-8-8 Huawei P Smart Octa-core (4x2.36 GHz Cortex-A53 & 4x1.7 GHz Cortex-A53)
par__test_cpu_detection_lscpu 2 8 8 8
par__test_cpu_detection_lscpu 1-4-4-4 x96 quad-core Android TV-box
par__test_cpu_detection_lscpu 1 4 4 4
par_basic_halt parallel: This job failed:
par_basic_halt false
par_basic_halt parallel: This job succeeded:
par_basic_halt true
par_basic_halt parallel: Error: --halt must have 'never', 'soon', or 'now'.
par_basic_halt parallel: Error: --halt soon must be followed by ,success or ,fail.
par_basic_halt parallel: Error: --halt now must be followed by ,success or ,fail.
par_block_negative_prefix ### This should generate 10*2 jobs par_block_negative_prefix ### This should generate 10*2 jobs
par_block_negative_prefix 20 40 720 par_block_negative_prefix 20 40 720
par_bug34241 ### bug #34241: --pipe should not spawn unneeded processes par_bug34241 ### bug #34241: --pipe should not spawn unneeded processes
@ -84,8 +331,6 @@ par_bug37042 a tag_with_a
par_bug37042 a -J bug_37042_profile print_-J_bug_37042_profile par_bug37042 a -J bug_37042_profile print_-J_bug_37042_profile
par_bug37042 ### Bug introduce by fixing bug #37042 par_bug37042 ### Bug introduce by fixing bug #37042
par_bug37042 abc par_bug37042 abc
par_bug43654 bug #43654: --bar with command not using {} - only last output line
par_bug43654 par_bug43654 100% 1:0=0s 1 
par_commandline_with_newline bug #51299: --retry-failed with command with newline par_commandline_with_newline bug #51299: --retry-failed with command with newline
par_commandline_with_newline The format must remain the same par_commandline_with_newline The format must remain the same
par_commandline_with_newline . : ... ... . . . . false "command<null>with<null>newlines" a par_commandline_with_newline . : ... ... . . . . false "command<null>with<null>newlines" a
@ -117,12 +362,6 @@ par_compute_command_len 11 3
par_compute_command_len a_b_c_ par_compute_command_len a_b_c_
par_compute_command_len a_b_c_d par_compute_command_len a_b_c_d
par_compute_command_len par_compute_command_len
par_empty_string_command_line ### Test of ignore-empty string on :::
par_empty_string_command_line foo
par_empty_string_command_line ole
par_empty_string_command_line bar
par_eof_on_command_line_input_source ### Test of eof string on :::
par_eof_on_command_line_input_source foo
par_file_rpl ### file as replacement string par_file_rpl ### file as replacement string
par_file_rpl # {filename} par_file_rpl # {filename}
par_file_rpl content1 par_file_rpl content1
@ -238,6 +477,21 @@ par_interactive sleep 0.1; echo opt-p 1 ?...y
par_interactive sleep 0.1; echo opt-p 2 ?...n par_interactive sleep 0.1; echo opt-p 2 ?...n
par_interactive sleep 0.1; echo opt-p 3 ?...y par_interactive sleep 0.1; echo opt-p 3 ?...y
par_interactive spawn /tmp/parallel-script-for-expect par_interactive spawn /tmp/parallel-script-for-expect
par_jobslot_jobnumber_pipe ### Test bug #43376: {%} and {#} with --pipe
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_jobslot_jobnumber_pipe 1
par_keep_order ### Bug made 4 5 go before 1 2 3
par_keep_order 1
par_keep_order 2
par_keep_order 3
par_keep_order 4
par_keep_order 5
par_keep_order ### Bug made 3 go before 1 2
par_keep_order 1
par_keep_order 2
par_keep_order 3
par_long_input ### Long input lines should not fail if they are not used par_long_input ### Long input lines should not fail if they are not used
par_long_input a a a a par_long_input a a a a
par_long_input b b b b par_long_input b b b b
@ -437,57 +691,6 @@ par_pipepart_block 17-20
par_pipepart_block 18-20 par_pipepart_block 18-20
par_pipepart_block 19-20 par_pipepart_block 19-20
par_pipepart_block 20-20 par_pipepart_block 20-20
par_plus ### --plus
par_plus (It is OK to start with extra / or end with extra .)
par_plus a = /a = a. = /a. = a. = /a. = a. = /a.
par_plus a.b = /a.b = a.b = /a.b = a.b. = /a.b. = a.b. = /a.b.
par_plus a.b.c = /a.b.c = a.b.c = /a.b.c = a.b.c = /a.b.c = a.b.c. = /a.b.c.
par_plus a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d = a.b.c.d = /a.b.c.d
par_plus a/1 = a/1 = a/1. = a/1. = a/1. = a/1. = a/1. = a/1.
par_plus a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2 = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.
par_plus a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3 = a.b.c/1.2.3. = a.b.c/1.2.3.
par_plus a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4 = a.b.c.d/1.2.3.4
par_plus a. = /a. = a. = /a. = a.. = /a.. = a.. = /a..
par_plus a.b. = /a.b. = a.b. = /a.b. = a.b. = /a.b. = a.b.. = /a.b..
par_plus a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c. = a.b.c. = /a.b.c.
par_plus a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d. = a.b.c.d. = /a.b.c.d.
par_plus a/1. = a/1. = a/1. = a/1. = a/1.. = a/1.. = a/1.. = a/1..
par_plus a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2. = a.b/1.2.. = a.b/1.2..
par_plus a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3. = a.b.c/1.2.3.
par_plus a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4. = a.b.c.d/1.2.3.4.
par_plus a.. = /a.. = a.. = /a.. = a.. = /a.. = a... = /a...
par_plus a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b.. = a.b.. = /a.b..
par_plus a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c.. = a.b.c.. = /a.b.c..
par_plus a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d.. = a.b.c.d.. = /a.b.c.d..
par_plus a./1. = a./1. = a./1. = a./1. = a./1.. = a./1.. = a./1.. = a./1..
par_plus a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2.. = a.b./1.2..
par_plus a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3.. = a.b.c./1.2.3..
par_plus a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4.. = a.b.c.d./1.2.3.4..
par_plus ### Test {%...} {%%...} {#...} {##...}
par_plus z.foo
par_plus z.foo
par_plus foo
par_plus foo
par_plus foo.z
par_plus foo.z
par_plus foo
par_plus foo
par_plus A B C
par_plus A C B
par_plus B A C
par_plus B C A
par_plus C A B
par_plus C B A
par_plus A+B+C
par_plus A+C+B
par_plus B+A+C
par_plus B+C+A
par_plus C+A+B
par_plus C+B+A
par_plus A B C
par_plus A B D
par_plus A C D
par_plus B C D
par_profiles_with_space ### bug #42902: profiles containing arguments with space par_profiles_with_space ### bug #42902: profiles containing arguments with space
par_profiles_with_space /bin/bash=/bin/bash par_profiles_with_space /bin/bash=/bin/bash
par_profiles_with_space echo '/bin/bash=/bin/bash' par_profiles_with_space echo '/bin/bash=/bin/bash'
@ -497,6 +700,25 @@ par_pxz_complains bug #44250: pxz complains File format not recognized but decom
par_pxz_complains ls: cannot access '/OK-if-missing-file': No such file or directory par_pxz_complains ls: cannot access '/OK-if-missing-file': No such file or directory
par_pxz_complains can not seek in input: Illegal seek par_pxz_complains can not seek in input: Illegal seek
par_pxz_complains ls: cannot access '/OK-if-missing-file': No such file or directory par_pxz_complains ls: cannot access '/OK-if-missing-file': No such file or directory
par_quote_bugs ### Bug did not quote
par_quote_bugs echo '>'
par_quote_bugs >
par_quote_bugs echo '>'
par_quote_bugs >
par_quote_bugs echo '>' 2
par_quote_bugs > 2
par_quote_bugs > 2
par_quote_bugs ### Must not quote
par_quote_bugs echo | wc -l
par_quote_bugs 1
par_quote_bugs echo | wc -l
par_quote_bugs 1
par_quote_bugs echo a b c | wc -w
par_quote_bugs 3
par_quote_bugs echo a b c | wc -w
par_quote_bugs 3
par_quote_bugs echo a b | wc -w
par_quote_bugs 2
par_recend_recstart_hash ### bug #59843: --regexp --recstart '#' fails par_recend_recstart_hash ### bug #59843: --regexp --recstart '#' fails
par_recend_recstart_hash 2 2 10 par_recend_recstart_hash 2 2 10
par_recend_recstart_hash 1 1 6 par_recend_recstart_hash 1 1 6
@ -554,6 +776,13 @@ par_replacement_rename b
par_replacement_rename b par_replacement_rename b
par_replacement_rename b par_replacement_rename b
par_replacement_rename b par_replacement_rename b
par_replacement_string_as_part_of_command ### {} as part of the command
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_string_as_part_of_command /bin/ls
par_replacement_strings ### Test {/} par_replacement_strings ### Test {/}
par_replacement_strings b.c b.c b.c b b b par_replacement_strings b.c b.c b.c b b b
par_replacement_strings ### Test {/.} par_replacement_strings ### Test {/.}
@ -826,10 +1055,77 @@ par_results_compress
par_results_compress / par_results_compress /
par_results_compress par_results_compress
par_results_compress / par_results_compress /
par_seqreplace_long_line ### Test --seqreplace and line too long par_retired ### Test retired
par_seqreplace_long_line 9 1 1 101 par_retired parallel: Error: -g has been retired. Use --group.
par_seqreplace_long_line 90 1 1 201 par_retired parallel: Error: -B has been retired. Use --bf.
par_seqreplace_long_line 1 parallel: Error: Command line too long (309 >= 210) at input 0: 100 par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_retired parallel: Error: -g has been retired. Use --group.
par_retired parallel: Error: -B has been retired. Use --bf.
par_retired parallel: Error: -T has been retired. Use --tty.
par_retired parallel: Error: -U has been retired. Use --er.
par_retired parallel: Error: -W has been retired. Use --wd.
par_retired parallel: Error: -Y has been retired. Use --shebang.
par_retired parallel: Error: -H has been retired. Use --halt.
par_retired parallel: Error: --sql has been retired. Use --sqlmaster.
par_retired parallel: Error: --ctrlc has been retired.
par_retired parallel: Error: --noctrlc has been retired.
par_skip_first_line MyHeader par_skip_first_line MyHeader
par_skip_first_line 1 par_skip_first_line 1
par_skip_first_line 2 par_skip_first_line 2
@ -855,40 +1151,24 @@ par_skip_first_line 7
par_skip_first_line 8 par_skip_first_line 8
par_skip_first_line 9 par_skip_first_line 9
par_skip_first_line 10 par_skip_first_line 10
par_sql_colsep ### SQL should add Vn columns for --colsep
par_sql_colsep /a/A/1/11/
par_sql_colsep /a/A/2/22/
par_sql_colsep /a/A/3/33/
par_sql_colsep /b/B/1/11/
par_sql_colsep /b/B/2/22/
par_sql_colsep /b/B/3/33/
par_sql_colsep /c/C/1/11/
par_sql_colsep /c/C/2/22/
par_sql_colsep /c/C/3/33/
par_sql_colsep /a/A/1/11/
par_sql_colsep /a/A/2/22/
par_sql_colsep /a/A/3/33/
par_sql_colsep /b/B/1/11/
par_sql_colsep /b/B/2/22/
par_sql_colsep /b/B/3/33/
par_sql_colsep /c/C/1/11/
par_sql_colsep /c/C/2/22/
par_sql_colsep /c/C/3/33/
par_sql_colsep a A 1 11 a A 2 22 a A 3 33
par_sql_colsep a A 4 44 a A 5 55 a A 6 66
par_sql_colsep b B 1 11 b B 2 22 b B 3 33
par_sql_colsep b B 4 44 b B 5 55 b B 6 66
par_sql_colsep c C 1 11 c C 2 22 c C 3 33
par_sql_colsep c C 4 44 c C 5 55 c C 6 66
par_sql_colsep a A 1 11 a A 2 22 a A 3 33
par_sql_colsep a A 4 44 a A 5 55 a A 6 66
par_sql_colsep b B 1 11 b B 2 22 b B 3 33
par_sql_colsep b B 4 44 b B 5 55 b B 6 66
par_sql_colsep c C 1 11 c C 2 22 c C 3 33
par_sql_colsep c C 4 44 c C 5 55 c C 6 66
par_sqlandworker_uninstalled_dbd ### bug #56096: dbi-csv no such column par_sqlandworker_uninstalled_dbd ### bug #56096: dbi-csv no such column
par_sqlandworker_uninstalled_dbd parallel: Error: CSV not supported. Are you missing a perl DBD::CSV module? par_sqlandworker_uninstalled_dbd parallel: Error: CSV not supported. Are you missing a perl DBD::CSV module?
par_sqlandworker_uninstalled_dbd works par_sqlandworker_uninstalled_dbd works
par_tagstring ### Test --tagstring
par_tagstring a3b a4b echo 3 4
par_tagstring a3b a4b 3 4
par_tagstring a3b echo 3
par_tagstring a3b 3
par_tagstring a4b echo 4
par_tagstring a4b 4
par_tagstring a3b echo job1
par_tagstring a3b job1
par_tagstring a4b echo job2
par_tagstring a4b job2
par_tagstring ajob1b echo job1
par_tagstring ajob1b job1
par_tagstring ajob2b echo job2
par_tagstring ajob2b job2
par_test_E ### Test -E par_test_E ### Test -E
par_test_E 1 2 3 par_test_E 1 2 3
par_test_E 1 2 4 par_test_E 1 2 4
@ -921,132 +1201,6 @@ par_test_E ### Test -E 2 empty
par_test_E 1 par_test_E 1
par_test_E 2 par_test_E 2
par_test_E ### Test -E all empty par_test_E ### Test -E all empty
par_test_XI_mI ### Test -I
par_test_XI_mI 1 1
par_test_XI_mI 2 1
par_test_XI_mI 2 2
par_test_XI_mI 3 1
par_test_XI_mI 3 2
par_test_XI_mI 3 3
par_test_XI_mI 4 1
par_test_XI_mI 4 2
par_test_XI_mI 4 3
par_test_XI_mI 4 4
par_test_XI_mI 5 1
par_test_XI_mI 5 2
par_test_XI_mI 5 3
par_test_XI_mI 5 4
par_test_XI_mI 5 5
par_test_XI_mI 6 1
par_test_XI_mI 6 2
par_test_XI_mI 6 3
par_test_XI_mI 6 4
par_test_XI_mI 6 5
par_test_XI_mI 6 6
par_test_XI_mI 7 1
par_test_XI_mI 7 2
par_test_XI_mI 7 3
par_test_XI_mI 7 4
par_test_XI_mI 7 5
par_test_XI_mI 7 6
par_test_XI_mI 7 7
par_test_XI_mI 8 1
par_test_XI_mI 8 2
par_test_XI_mI 8 3
par_test_XI_mI 8 4
par_test_XI_mI 8 5
par_test_XI_mI 8 6
par_test_XI_mI 8 7
par_test_XI_mI 8 8
par_test_XI_mI 9 1
par_test_XI_mI 9 2
par_test_XI_mI 9 3
par_test_XI_mI 9 4
par_test_XI_mI 9 5
par_test_XI_mI 9 6
par_test_XI_mI 9 7
par_test_XI_mI 9 8
par_test_XI_mI 9 9
par_test_XI_mI 10 1
par_test_XI_mI 10 2
par_test_XI_mI 10 3
par_test_XI_mI 10 4
par_test_XI_mI 10 5
par_test_XI_mI 10 6
par_test_XI_mI 10 7
par_test_XI_mI 10 8
par_test_XI_mI 10 9
par_test_XI_mI 10 10
par_test_XI_mI ### Test -X -I
par_test_XI_mI a1 b1
par_test_XI_mI a2 b1 b2
par_test_XI_mI a3 b1 b2 b3
par_test_XI_mI a4 b1 b2 b3 b4
par_test_XI_mI a5 b1 b2 b3 b4 b5
par_test_XI_mI a6 b1 b2 b3 b4 b5 b6
par_test_XI_mI a7 b1 b2 b3 b4 b5 b6 b7
par_test_XI_mI a8 b1 b2 b3 b4 b5 b6 b7 b8
par_test_XI_mI a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
par_test_XI_mI a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
par_test_XI_mI ### Test -m -I
par_test_XI_mI a1 b1
par_test_XI_mI a2 b1 2
par_test_XI_mI a3 b1 2 3
par_test_XI_mI a4 b1 2 3 4
par_test_XI_mI a5 b1 2 3 4 5
par_test_XI_mI a6 b1 2 3 4 5 6
par_test_XI_mI a7 b1 2 3 4 5 6 7
par_test_XI_mI a8 b1 2 3 4 5 6 7 8
par_test_XI_mI a9 b1 2 3 4 5 6 7 8 9
par_test_XI_mI a10 b1 2 3 4 5 6 7 8 9 10
par_test_cpu_detection_cpuinfo 2-8-8-8 Xeon 8 core server in Germany
par_test_cpu_detection_cpuinfo 2 8 8 8
par_test_cpu_detection_cpuinfo 4-48-48-48 Dell R815 4 CPU 48-core
par_test_cpu_detection_cpuinfo 4 24 48 24
par_test_cpu_detection_cpuinfo 1-4-8-4 4-core/8 thread Lenovo T480
par_test_cpu_detection_cpuinfo 1 4 8 4
par_test_cpu_detection_cpuinfo 4-64-64-64 Dell R815 4 CPU 64-core
par_test_cpu_detection_cpuinfo 4 32 64 32
par_test_cpu_detection_cpuinfo 1-2-2-2 AMD Neo N36L Dual-Core Processor
par_test_cpu_detection_cpuinfo 1 2 2 2
par_test_cpu_detection_cpuinfo 1-1-1-1 Intel Xeon X5675 (mandriva.p)
par_test_cpu_detection_cpuinfo 1 1 1 1
par_test_cpu_detection_cpuinfo 1-1-1-1 Intel(R) Celeron(R) M (eee900)
par_test_cpu_detection_cpuinfo 1 1 1 1
par_test_cpu_detection_cpuinfo 1-4-8-4 Core i7-3632QM Acer laptop
par_test_cpu_detection_cpuinfo 1 4 8 4
par_test_cpu_detection_cpuinfo 1-2-4-2 Core i5-2410M laptop firewall
par_test_cpu_detection_cpuinfo 1 2 4 2
par_test_cpu_detection_cpuinfo 1-2-2-2 AMD Opteron 244 dual core laptop(?)
par_test_cpu_detection_cpuinfo 1 2 2 2
par_test_cpu_detection_cpuinfo 2-24-48-24 24-core (maxwell?)
par_test_cpu_detection_cpuinfo 2 24 48 24
par_test_cpu_detection_cpuinfo 1-2-2-2 HP Laptop Compaq 6530b
par_test_cpu_detection_cpuinfo 1 2 2 2
par_test_cpu_detection_cpuinfo 1-8-8-8 Huawei P Smart Octa-core (4x2.36 GHz Cortex-A53 & 4x1.7 GHz Cortex-A53)
par_test_cpu_detection_cpuinfo 1 8 8 8
par_test_cpu_detection_cpuinfo 1-4-4-4 x96 quad-core Android TV-box
par_test_cpu_detection_cpuinfo 1 4 4 4
par_test_cpu_detection_cpuinfo 1-6-6-6 Kramses 200 USD laptop 6-core
par_test_cpu_detection_cpuinfo 1 6 6 6
par_test_cpu_detection_lscpu 2-8-8-8 Xeon 8 core server in Germany
par_test_cpu_detection_lscpu 2 8 8 8
par_test_cpu_detection_lscpu 4-64-64-64 Dell R815 4 CPU 64-core
par_test_cpu_detection_lscpu 4 8 8 8
par_test_cpu_detection_lscpu 1-2-2-2 AMD Neo N36L Dual-Core Processor
par_test_cpu_detection_lscpu 1 2 2 2
par_test_cpu_detection_lscpu 1-1-1-1 Intel Xeon X5675 (mandriva.p)
par_test_cpu_detection_lscpu 1 1 1 1
par_test_cpu_detection_lscpu 1-1-1-1 Intel(R) Celeron(R) M (eee900)
par_test_cpu_detection_lscpu 1 1 1 1
par_test_cpu_detection_lscpu 1-4-8-4 Core i7-3632QM Acer laptop
par_test_cpu_detection_lscpu 1 4 8 4
par_test_cpu_detection_lscpu 1-2-4-2 Core i5-2410M laptop firewall
par_test_cpu_detection_lscpu 1 2 4 2
par_test_cpu_detection_lscpu 1-8-8-8 Huawei P Smart Octa-core (4x2.36 GHz Cortex-A53 & 4x1.7 GHz Cortex-A53)
par_test_cpu_detection_lscpu 2 8 8 8
par_test_cpu_detection_lscpu 1-4-4-4 x96 quad-core Android TV-box
par_test_cpu_detection_lscpu 1 4 4 4
par_test_gt_quoting ### Test of quoting of > bug par_test_gt_quoting ### Test of quoting of > bug
par_test_gt_quoting >/dev/null par_test_gt_quoting >/dev/null
par_test_gt_quoting ### Test of quoting of > bug if line continuation par_test_gt_quoting ### Test of quoting of > bug if line continuation
@ -1062,6 +1216,55 @@ par_test_job_number 7
par_test_job_number 8 par_test_job_number 8
par_test_job_number 9 par_test_job_number 9
par_test_job_number 10 par_test_job_number 10
par_test_m_X ### Test -m vs -X
par_test_m_X 1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
par_test_m_X 1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
par_test_m_X a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
par_test_m_X a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
par_test_m_X ### Test -q {.}
par_test_m_X 'a'
par_test_m_X 'a'
par_testquote ash "#&/
par_testquote ash ()*=?'
par_testquote bash "#&/
par_testquote bash ()*=?'
par_testquote csh "#&/
par_testquote csh ()*=?'
par_testquote dash "#&/
par_testquote dash ()*=?'
par_testquote fdsh "#&/
par_testquote fdsh ()*=?'
par_testquote fish "#&/
par_testquote fish ()*=?'
par_testquote fizsh "#&/
par_testquote fizsh ()*=?'
par_testquote ksh "#&/
par_testquote ksh ()*=?'
par_testquote ksh93 "#&/
par_testquote ksh93 ()*=?'
par_testquote mksh "#&/
par_testquote mksh ()*=?'
par_testquote posh "#&/
par_testquote posh ()*=?'
par_testquote rbash "#&/
par_testquote rbash ()*=?'
par_testquote rc "#&/
par_testquote rc ()*=?'
par_testquote rzsh "#&/
par_testquote rzsh ()*=?'
par_testquote sash -f parallel: Error: Shell 'sash -f' not found.
par_testquote sh "#&/
par_testquote sh ()*=?'
par_testquote static-sh "#&/
par_testquote static-sh ()*=?'
par_testquote tcsh "#&/
par_testquote tcsh ()*=?'
par_testquote yash "#&/
par_testquote yash ()*=?'
par_testquote zsh "#&/
par_testquote zsh ()*=?'
par_testquote fdsh "#&/
par_testquote fdsh ()*=?'
par_too_long_line_X bug #54869: Long lines break par_too_long_line_X bug #54869: Long lines break
par_too_long_line_X 1 15820 63602 par_too_long_line_X 1 15820 63602
par_too_long_line_X 1 12726 63630 par_too_long_line_X 1 12726 63630
@ -1078,5 +1281,3 @@ par_trailing_space_line_continuation ### Test of trailing space continuation wit
par_trailing_space_line_continuation foo ole par_trailing_space_line_continuation foo ole
par_trailing_space_line_continuation foo ole par_trailing_space_line_continuation foo ole
par_trailing_space_line_continuation foo ole par_trailing_space_line_continuation foo ole
par_uninstalled_sshpass ### sshpass must be installed for --sshlogin user:pass@host
par_uninstalled_sshpass parallel: Error: --sshlogin with password requires sshpass installed

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,3 @@
par_10000_5_rpl_X ### Test -X with 10000 args and 5 replacement strings
par_10000_5_rpl_X 5
par_10000_5_rpl_X 4
par_10000_5_rpl_X 4
par_10000_5_rpl_X 3
par_10000_5_rpl_X 2
par_10000_m_X ### Test -m with 10000 args par_10000_m_X ### Test -m with 10000 args
par_10000_m_X 3 29994 186685 par_10000_m_X 3 29994 186685
par_10000_m_X 5642f8f374aa4881e96f4f49e932d109 - par_10000_m_X 5642f8f374aa4881e96f4f49e932d109 -
@ -12,6 +6,168 @@ par_X_I_meta 3
par_X_I_meta 3 par_X_I_meta 3
par_X_I_meta 3 par_X_I_meta 3
par_X_I_meta 3 par_X_I_meta 3
par__10000_5_rpl_X ### Test -X with 10000 args and 5 replacement strings
par__10000_5_rpl_X 5
par__10000_5_rpl_X 4
par__10000_5_rpl_X 4
par__10000_5_rpl_X 3
par__10000_5_rpl_X 2
par__parset_assoc_arr bash@lo parset into an assoc array
par__parset_assoc_arr bash@lo val 1 val 2 val 3
par__parset_assoc_arr bash@lo val 1 val 2 val 3
par__parset_assoc_arr bash@lo val 1 val 2 val 3
par__parset_assoc_arr bash@lo Bad var name
par__parset_assoc_arr bash@lo parset: Error: -badname is an invalid variable name.
par__parset_assoc_arr bash@lo parset: Error: Variable names must be letter followed by letters or digits.
par__parset_assoc_arr bash@lo parset: Error: Usage:
par__parset_assoc_arr bash@lo parset: Error: parset varname GNU Parallel options and command
par__parset_assoc_arr bash@lo Too few var names
par__parset_assoc_arr bash@lo parset: Error: Too few named destination variables
par__parset_assoc_arr bash@lo val 2
par__parset_assoc_arr bash@lo Exit value
par__parset_assoc_arr bash@lo 2
par__parset_assoc_arr bash@lo 2
par__parset_assoc_arr bash@lo 2
par__parset_assoc_arr bash@lo Stderr to stderr
par__parset_assoc_arr bash@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr bash@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr bash@lo ls: cannot access 'no-such-file1': No such file or directory
par__parset_assoc_arr bash@lo ls: cannot access 'no-such-file2': No such file or directory
par__parset_assoc_arr ksh@lo parset into an assoc array
par__parset_assoc_arr ksh@lo val 1 val 2 val 3
par__parset_assoc_arr ksh@lo val 1 val 2 val 3
par__parset_assoc_arr ksh@lo val 1 val 2 val 3
par__parset_assoc_arr ksh@lo Bad var name
par__parset_assoc_arr ksh@lo parset: Error: -badname is an invalid variable name.
par__parset_assoc_arr ksh@lo parset: Error: Variable names must be letter followed by letters or digits.
par__parset_assoc_arr ksh@lo parset: Error: Usage:
par__parset_assoc_arr ksh@lo parset: Error: parset varname GNU Parallel options and command
par__parset_assoc_arr ksh@lo Too few var names
par__parset_assoc_arr ksh@lo parset: Error: Too few named destination variables
par__parset_assoc_arr ksh@lo val 2
par__parset_assoc_arr ksh@lo Exit value
par__parset_assoc_arr ksh@lo 2
par__parset_assoc_arr ksh@lo 2
par__parset_assoc_arr ksh@lo 2
par__parset_assoc_arr ksh@lo Stderr to stderr
par__parset_assoc_arr ksh@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr ksh@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr ksh@lo ls: cannot access 'no-such-file1': No such file or directory
par__parset_assoc_arr ksh@lo ls: cannot access 'no-such-file2': No such file or directory
par__parset_assoc_arr zsh@lo parset into an assoc array
par__parset_assoc_arr zsh@lo val 1 val 2 val 3
par__parset_assoc_arr zsh@lo val 1 val 2
par__parset_assoc_arr zsh@lo val 1 val 2 val 3
par__parset_assoc_arr zsh@lo Bad var name
par__parset_assoc_arr zsh@lo parset: Error: -badname is an invalid variable name.
par__parset_assoc_arr zsh@lo parset: Error: Variable names must be letter followed by letters or digits.
par__parset_assoc_arr zsh@lo parset: Error: Usage:
par__parset_assoc_arr zsh@lo parset: Error: parset varname GNU Parallel options and command
par__parset_assoc_arr zsh@lo Too few var names
par__parset_assoc_arr zsh@lo parset: Error: Too few named destination variables
par__parset_assoc_arr zsh@lo val 2
par__parset_assoc_arr zsh@lo Exit value
par__parset_assoc_arr zsh@lo 2
par__parset_assoc_arr zsh@lo 2
par__parset_assoc_arr zsh@lo 2
par__parset_assoc_arr zsh@lo Stderr to stderr
par__parset_assoc_arr zsh@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr zsh@lo ls: cannot access 'no-such-file': No such file or directory
par__parset_assoc_arr zsh@lo ls: cannot access 'no-such-file1': No such file or directory
par__parset_assoc_arr zsh@lo ls: cannot access 'no-such-file2': No such file or directory
par__prefix_for_L_n_N_s Must give xxx000 args
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s 1000
par__prefix_for_L_n_N_s Must give xxx000 lines
par__prefix_for_L_n_N_s 149000
par__prefix_for_L_n_N_s 149000
par__prefix_for_L_n_N_s 149000
par__prefix_for_L_n_N_s 149000
par__prefix_for_L_n_N_s 149000
par__prefix_for_L_n_N_s 165000
par__prefix_for_L_n_N_s 90000
par__prefix_for_L_n_N_s Must give max 1000 chars per line
par__prefix_for_L_n_N_s 126
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 197
par__prefix_for_L_n_N_s 244
par__prefix_for_L_n_N_s 246
par__prefix_for_L_n_N_s 246
par__prefix_for_L_n_N_s 273
par__tee_too_many_args ### Fail if there are more arguments than --jobs
par__tee_too_many_args 1 1
par__tee_too_many_args 1 10
par__tee_too_many_args 1 11
par__tee_too_many_args 2 2
par__tee_too_many_args 3 3
par__tee_too_many_args 4 4
par__tee_too_many_args parallel: Warning: Only enough file handles to run 999 jobs in parallel.
par__tee_too_many_args parallel: Warning: Try running 'parallel -j999 -N 999 --pipe parallel -j999'
par__tee_too_many_args parallel: Warning: or increasing 'ulimit -n' (try: ulimit -n `ulimit -Hn`)
par__tee_too_many_args parallel: Warning: or increasing 'nofile' in /etc/security/limits.conf
par__tee_too_many_args parallel: Warning: or increasing /proc/sys/fs/file-max
par__tee_too_many_args parallel: Error: --tee requires --jobs to be higher. Try --jobs 999.
par_children_receive_sig ### Do children receive --termseq signals par_children_receive_sig ### Do children receive --termseq signals
par_children_receive_sig parallel: Warning: This job was killed because it timed out: par_children_receive_sig parallel: Warning: This job was killed because it timed out:
par_children_receive_sig parallel: Warning: show_signals '' par_children_receive_sig parallel: Warning: show_signals ''
@ -177,69 +333,82 @@ par_multiline_commands echo finish 4
par_multiline_commands parallel: Warning: Command lines contain newline. Forcing --null. par_multiline_commands parallel: Warning: Command lines contain newline. Forcing --null.
par_multiline_commands 4 par_multiline_commands 4
par_multiline_commands finish 4 par_multiline_commands finish 4
par_parset_assoc_arr bash@lo parset into an assoc array par_parset ### test parset
par_parset_assoc_arr bash@lo val 1 val 2 val 3 par_parset Put output into $myarray
par_parset_assoc_arr bash@lo val 1 val 2 val 3 par_parset 10
par_parset_assoc_arr bash@lo val 1 val 2 val 3 par_parset 11
par_parset_assoc_arr bash@lo Bad var name par_parset 12
par_parset_assoc_arr bash@lo parset: Error: -badname is an invalid variable name. par_parset 13
par_parset_assoc_arr bash@lo parset: Error: Variable names must be letter followed by letters or digits. par_parset 14
par_parset_assoc_arr bash@lo parset: Error: Usage: par_parset 15
par_parset_assoc_arr bash@lo parset: Error: parset varname GNU Parallel options and command par_parset Put output into vars "$seq, $pwd, $ls"
par_parset_assoc_arr bash@lo Too few var names par_parset 1
par_parset_assoc_arr bash@lo parset: Error: Too few named destination variables par_parset 2
par_parset_assoc_arr bash@lo val 2 par_parset 3
par_parset_assoc_arr bash@lo Exit value par_parset 4
par_parset_assoc_arr bash@lo 2 par_parset 5
par_parset_assoc_arr bash@lo 2 par_parset 6
par_parset_assoc_arr bash@lo 2 par_parset 7
par_parset_assoc_arr bash@lo Stderr to stderr par_parset 8
par_parset_assoc_arr bash@lo ls: cannot access 'no-such-file': No such file or directory par_parset 9
par_parset_assoc_arr bash@lo ls: cannot access 'no-such-file': No such file or directory par_parset 10
par_parset_assoc_arr bash@lo ls: cannot access 'no-such-file1': No such file or directory par_parset Put output into vars ($seq, $pwd, $ls):
par_parset_assoc_arr bash@lo ls: cannot access 'no-such-file2': No such file or directory par_parset 1
par_parset_assoc_arr ksh@lo parset into an assoc array par_parset 2
par_parset_assoc_arr ksh@lo val 1 val 2 val 3 par_parset 3
par_parset_assoc_arr ksh@lo val 1 val 2 val 3 par_parset 4
par_parset_assoc_arr ksh@lo val 1 val 2 val 3 par_parset 5
par_parset_assoc_arr ksh@lo Bad var name par_parset The commands to run can be an array
par_parset_assoc_arr ksh@lo parset: Error: -badname is an invalid variable name. par_parset <<joe "double space" cartoon>>
par_parset_assoc_arr ksh@lo parset: Error: Variable names must be letter followed by letters or digits. par_parset /TMP
par_parset_assoc_arr ksh@lo parset: Error: Usage: par_parset You cannot pipe into parset, but must use a tempfile
par_parset_assoc_arr ksh@lo parset: Error: parset varname GNU Parallel options and command par_parset 1
par_parset_assoc_arr ksh@lo Too few var names par_parset 10
par_parset_assoc_arr ksh@lo parset: Error: Too few named destination variables par_parset or process substitution
par_parset_assoc_arr ksh@lo val 2 par_parset 0
par_parset_assoc_arr ksh@lo Exit value par_parset 9
par_parset_assoc_arr ksh@lo 2 par_parset Commands with newline require -0
par_parset_assoc_arr ksh@lo 2 par_parset line1
par_parset_assoc_arr ksh@lo 2 par_parset line2
par_parset_assoc_arr ksh@lo Stderr to stderr par_parset2 ### parset into array
par_parset_assoc_arr ksh@lo ls: cannot access 'no-such-file': No such file or directory par_parset2 foo bar baz
par_parset_assoc_arr ksh@lo ls: cannot access 'no-such-file': No such file or directory par_parset2 ### parset into vars with comma
par_parset_assoc_arr ksh@lo ls: cannot access 'no-such-file1': No such file or directory par_parset2 foo bar baz
par_parset_assoc_arr ksh@lo ls: cannot access 'no-such-file2': No such file or directory par_parset2 ### parset into vars with space
par_parset_assoc_arr zsh@lo parset into an assoc array par_parset2 foo bar baz
par_parset_assoc_arr zsh@lo val 1 val 2 val 3 par_parset2 ### parset with newlines
par_parset_assoc_arr zsh@lo val 1 val 2 par_parset2 1
par_parset_assoc_arr zsh@lo val 1 val 2 val 3 par_parset2 1
par_parset_assoc_arr zsh@lo Bad var name par_parset2 2
par_parset_assoc_arr zsh@lo parset: Error: -badname is an invalid variable name. par_parset2 1
par_parset_assoc_arr zsh@lo parset: Error: Variable names must be letter followed by letters or digits. par_parset2 2
par_parset_assoc_arr zsh@lo parset: Error: Usage: par_parset2 3
par_parset_assoc_arr zsh@lo parset: Error: parset varname GNU Parallel options and command par_parset2 ### parset into indexed array vars
par_parset_assoc_arr zsh@lo Too few var names par_parset2 foo bar baz
par_parset_assoc_arr zsh@lo parset: Error: Too few named destination variables par_parset2 foo bar bar
par_parset_assoc_arr zsh@lo val 2 par_parset2 ### env_parset
par_parset_assoc_arr zsh@lo Exit value par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset_assoc_arr zsh@lo 2 par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset_assoc_arr zsh@lo 2 par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset_assoc_arr zsh@lo 2 par_parset2 newline1
par_parset_assoc_arr zsh@lo Stderr to stderr par_parset2 newline2
par_parset_assoc_arr zsh@lo ls: cannot access 'no-such-file': No such file or directory par_parset2 1
par_parset_assoc_arr zsh@lo ls: cannot access 'no-such-file': No such file or directory par_parset2 newline1
par_parset_assoc_arr zsh@lo ls: cannot access 'no-such-file1': No such file or directory par_parset2 newline2
par_parset_assoc_arr zsh@lo ls: cannot access 'no-such-file2': No such file or directory par_parset2 1
par_parset2 2
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 2
par_parset2 3
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par_parset2 bug #52507: parset arr1 -v echo ::: fails
par_parset2 seq 3
par_parset2 1
par_parset2 2
par_parset2 3
par_pipe_regexp ### --pipe --regexp par_pipe_regexp ### --pipe --regexp
par_pipe_regexp Record par_pipe_regexp Record
par_pipe_regexp A2, Start, 5 par_pipe_regexp A2, Start, 5
@ -489,86 +658,6 @@ par_plus_slot_replacement Slot: 12 12
par_plus_slot_replacement Slot: 13 13 par_plus_slot_replacement Slot: 13 13
par_plus_slot_replacement Slot: 14 14 par_plus_slot_replacement Slot: 14 14
par_plus_slot_replacement Slot: 15 15 par_plus_slot_replacement Slot: 15 15
par_prefix_for_L_n_N_s Must give xxx000 args
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s 1000
par_prefix_for_L_n_N_s Must give xxx000 lines
par_prefix_for_L_n_N_s 149000
par_prefix_for_L_n_N_s 149000
par_prefix_for_L_n_N_s 149000
par_prefix_for_L_n_N_s 149000
par_prefix_for_L_n_N_s 149000
par_prefix_for_L_n_N_s 165000
par_prefix_for_L_n_N_s 90000
par_prefix_for_L_n_N_s Must give max 1000 chars per line
par_prefix_for_L_n_N_s 126
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 197
par_prefix_for_L_n_N_s 244
par_prefix_for_L_n_N_s 246
par_prefix_for_L_n_N_s 246
par_prefix_for_L_n_N_s 273
par_process_slot_var ### bug #62310: xargs compatibility: --process-slot-var=name par_process_slot_var ### bug #62310: xargs compatibility: --process-slot-var=name
par_process_slot_var 0 par_process_slot_var 0
par_process_slot_var 1 par_process_slot_var 1
@ -630,9 +719,6 @@ par_replacement_slashslash /a/b /a/b/c.jpg
par_replacement_slashslash . ./a.jpg par_replacement_slashslash . ./a.jpg
par_replacement_slashslash ./a ./a/b.jpg par_replacement_slashslash ./a ./a/b.jpg
par_replacement_slashslash ./a/b ./a/b/c.jpg par_replacement_slashslash ./a/b ./a/b/c.jpg
par_retries_0 --retries 0 = inf
par_retries_0 this wraps at 256 and should retry until it wraps
par_retries_0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
par_shebang ### Test different shebangs par_shebang ### Test different shebangs
par_shebang gp A par_shebang gp A
par_shebang gp B par_shebang gp B
@ -693,19 +779,6 @@ par_sqlworker_hostname <hostname>
par_sqlworker_hostname <hostname> par_sqlworker_hostname <hostname>
par_sshdelay ### test --sshdelay par_sshdelay ### test --sshdelay
par_sshdelay OK par_sshdelay OK
par_tee_too_many_args ### Fail if there are more arguments than --jobs
par_tee_too_many_args 1 1
par_tee_too_many_args 1 10
par_tee_too_many_args 1 11
par_tee_too_many_args 2 2
par_tee_too_many_args 3 3
par_tee_too_many_args 4 4
par_tee_too_many_args parallel: Warning: Only enough file handles to run 999 jobs in parallel.
par_tee_too_many_args parallel: Warning: Try running 'parallel -j999 -N 999 --pipe parallel -j999'
par_tee_too_many_args parallel: Warning: or increasing 'ulimit -n' (try: ulimit -n `ulimit -Hn`)
par_tee_too_many_args parallel: Warning: or increasing 'nofile' in /etc/security/limits.conf
par_tee_too_many_args parallel: Warning: or increasing /proc/sys/fs/file-max
par_tee_too_many_args parallel: Error: --tee requires --jobs to be higher. Try --jobs 999.
par_tee_with_premature_close --tee --pipe should send all data to all commands par_tee_with_premature_close --tee --pipe should send all data to all commands
par_tee_with_premature_close even if a command closes stdin before reading everything par_tee_with_premature_close even if a command closes stdin before reading everything
par_tee_with_premature_close tee with --output-error=warn-nopipe support par_tee_with_premature_close tee with --output-error=warn-nopipe support

View file

@ -5,6 +5,20 @@ par_bug56403 3 job3cjob3d
par_bug56403 1 job1a par_bug56403 1 job1a
par_bug56403 1 job1b par_bug56403 1 job1b
par_bug56403 2 job2cjob2d par_bug56403 2 job2cjob2d
par_change_content_--jobs_filename ### Test of -j filename with file content changing (missing -k is correct)
par_change_content_--jobs_filename sleep 3.3
par_change_content_--jobs_filename sleep 0.1
par_change_content_--jobs_filename sleep 0.2
par_change_content_--jobs_filename sleep 0.3
par_change_content_--jobs_filename sleep 0.4
par_change_content_--jobs_filename sleep 0.5
par_change_content_--jobs_filename sleep 0.6
par_change_content_--jobs_filename sleep 0.7
par_change_content_--jobs_filename sleep 2.1
par_change_content_--jobs_filename sleep 2.2
par_change_content_--jobs_filename sleep 2.3
par_change_content_--jobs_filename sleep 2.4
par_change_content_--jobs_filename sleep 2.5
par_csv_not_installed ### Give error if CSV.pm is not installed when using --csv par_csv_not_installed ### Give error if CSV.pm is not installed when using --csv
par_csv_not_installed parallel: Error: The perl module Text::CSV is not installed. par_csv_not_installed parallel: Error: The perl module Text::CSV is not installed.
par_csv_not_installed parallel: Error: Try installing libtext-csv-perl or perl-Text-CSV. par_csv_not_installed parallel: Error: Try installing libtext-csv-perl or perl-Text-CSV.
@ -12,7 +26,8 @@ par_delay_Xauto TODO: --retries for those that fail and --sshdelay
par_delay_Xauto ### bug #58911: --delay Xauto par_delay_Xauto ### bug #58911: --delay Xauto
par_delay_Xauto 0 par_delay_Xauto 0
par_delay_Xauto 2 par_delay_Xauto 2
par_distribute_input_by_ability ### bug #48290: round-robin does not distribute data based on business par_distribute_input_by_ability ### bug #48290: round-robin does not distribute data
par_distribute_input_by_ability based on busy-ness
par_distribute_input_by_ability ### Distribute input to jobs that are ready par_distribute_input_by_ability ### Distribute input to jobs that are ready
par_distribute_input_by_ability Job-slot n is 50% slower than n+1, so the order should be 1..7 par_distribute_input_by_ability Job-slot n is 50% slower than n+1, so the order should be 1..7
par_distribute_input_by_ability 1 par_distribute_input_by_ability 1

View file

@ -1,15 +1,18 @@
bug #46120: Suspend should suspend (at least local) children bug #46120: Suspend should suspend (at least local) children
it should burn 1.9 CPU seconds, but no more than that it should burn 1.9 CPU seconds, but no more than that
The 5 second sleep will make it be killed by timeout when it fgs The 5 second sleep will make it be killed by timeout when it fgs
input_source_pipe
stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" ::: 1 | \grep -q CPUTIME=1 $cmd
Zero=OK 0 Zero=OK 0
input_source_cmdline
echo 1 | stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" | \grep -q CPUTIME=1 $cmd
Zero=OK 0 Zero=OK 0
Control case: Burn for 2.9 seconds Control case: This should run 2.9 seconds
input_source_cmdline
stdout /usr/bin/time -f CPUTIME=%U parallel --timeout 5 -q perl -e "while(1){ }" ::: 1 | \grep -q CPUTIME=1 $cmd
1=OK 1 1=OK 1
par_PARALLEL_RSYNC_OPTS ### test rsync opts par_PARALLEL_RSYNC_OPTS ### test rsync opts
par_PARALLEL_RSYNC_OPTS -rlDzRRRR par_PARALLEL_RSYNC_OPTS -rlDzRRRR

View file

@ -1,4 +1,10 @@
par_--nonall_results ### --results --onall par_--nonall_results ### --results --onall
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results /TMP/onall par_--nonall_results /TMP/onall
par_--nonall_results /TMP/onall/noslashsh@lo par_--nonall_results /TMP/onall/noslashsh@lo
par_--nonall_results /TMP/onall/noslashsh@lo/1 par_--nonall_results /TMP/onall/noslashsh@lo/1
@ -98,6 +104,12 @@ par_--nonall_results /TMP/onall/rplslash/pwd/sh@lo
par_--nonall_results /TMP/onall/rplslash/pwd/csh@lo par_--nonall_results /TMP/onall/rplslash/pwd/csh@lo
par_--nonall_results /TMP/onall/rplslash/pwd/sh@lo.err par_--nonall_results /TMP/onall/rplslash/pwd/sh@lo.err
par_--nonall_results ### --results --nonall par_--nonall_results ### --results --nonall
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results parallel: Warning: --(n)onall + --results not supported (yet).
par_--nonall_results /TMP/nonall par_--nonall_results /TMP/nonall
par_--nonall_results /TMP/nonall/noslashsh@lo par_--nonall_results /TMP/nonall/noslashsh@lo
par_--nonall_results /TMP/nonall/noslashsh@lo/1 par_--nonall_results /TMP/nonall/noslashsh@lo/1
@ -148,28 +160,6 @@ par_--nonall_results /TMP/nonall/rplslash/csh@lo.seq
par_--nonall_results /TMP/nonall/rplslash/sh@lo par_--nonall_results /TMP/nonall/rplslash/sh@lo
par_--nonall_results /TMP/nonall/rplslash/csh@lo par_--nonall_results /TMP/nonall/rplslash/csh@lo
par_--nonall_results /TMP/nonall/rplslash/sh@lo.err par_--nonall_results /TMP/nonall/rplslash/sh@lo.err
par_--tmux_different_shells ### Test tmux works on different shells
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 0
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 4
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 0
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 4
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 0
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 4
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 0
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 4
par_--tmux_different_shells # command is currently too long for csh. Maybe it can be fixed?
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 0
par_--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_different_shells 4
par_--tmux_length ### works par_--tmux_length ### works
par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
@ -179,6 +169,28 @@ par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach par_--tmux_length See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells ### Test tmux works on different shells
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 0
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 4
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 0
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 4
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 0
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 4
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 0
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 4
par__--tmux_different_shells # command is currently too long for csh. Maybe it can be fixed?
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 0
par__--tmux_different_shells See output with: tmux -S /TMP/tmsXXXXX attach
par__--tmux_different_shells 4
par__test_different_rsync_versions ### different versions of rsync need fixups par__test_different_rsync_versions ### different versions of rsync need fixups
par__test_different_rsync_versions ### no output is good par__test_different_rsync_versions ### no output is good
par_bigvar_csh ### csh par_bigvar_csh ### csh

View file

@ -1,33 +1,3 @@
echo '### bug #41565: Print happens in blocks - not after each job complete'
### bug #41565: Print happens in blocks - not after each job complete
echo 'The timing here is important: a full second between each'
The timing here is important: a full second between each
perl -e 'for(1..30){print("$_\n");`sleep 1`}' | parallel -j3 'echo {#}' | timestamp -dd | perl -pe '$_=int($_+0.3)."\n"' | median
1
echo '300 ms jobs:'
300 ms jobs:
perl -e 'for(1..30){print("$_\n");`sleep .3`}' | parallel -j3 --delay 0.3 echo | timestamp -d -d | perl -pe 's/(.....).*/int($1*10+0.2)/e' | median
3
echo '### Test --tagstring'
### Test --tagstring
nice parallel -j1 -X -v --tagstring a{}b echo ::: 3 4
a3b a4b echo 3 4
a3b a4b 3 4
nice parallel -j1 -k -v --tagstring a{}b echo ::: 3 4
a3b echo 3
a3b 3
a4b echo 4
a4b 4
nice parallel -j1 -k -v --tagstring a{}b echo job{#} ::: 3 4
a3b echo job1
a3b job1
a4b echo job2
a4b job2
nice parallel -j1 -k -v --tagstring ajob{#}b echo job{#} ::: 3 4
ajob1b echo job1
ajob1b job1
ajob2b echo job2
ajob2b job2
echo '### Bug in --load'; nice parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3 echo '### Bug in --load'; nice parallel -k --load 30 sleep 0.1\;echo ::: 1 2 3
### Bug in --load ### Bug in --load
1 1
@ -41,85 +11,6 @@ echo '### Test --timeout'
7.7 7.7
8.8 8.8
9.9 9.9
echo '### Test retired'
### Test retired
stdout parallel -B foo
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -g
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -H 1
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -T
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -U foo
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -W foo
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
stdout parallel -Y
parallel: Error: -g has been retired. Use --group.
parallel: Error: -B has been retired. Use --bf.
parallel: Error: -T has been retired. Use --tty.
parallel: Error: -U has been retired. Use --er.
parallel: Error: -W has been retired. Use --wd.
parallel: Error: -Y has been retired. Use --shebang.
parallel: Error: -H has been retired. Use --halt.
parallel: Error: --sql has been retired. Use --sqlmaster.
parallel: Error: --ctrlc has been retired.
parallel: Error: --noctrlc has been retired.
echo '### Test --joblog followed by --resume --joblog' echo '### Test --joblog followed by --resume --joblog'
### Test --joblog followed by --resume --joblog ### Test --joblog followed by --resume --joblog
rm -f /tmp/joblog; timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog | wc -lw; rm -f /tmp/joblog; echo '### Test --resume --joblog followed by --resume --joblog'; rm -f /tmp/joblog2; timeout -k 1 1 parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog2 | wc -lw; rm -f /tmp/joblog2; echo '### Test --header' rm -f /tmp/joblog; timeout -k 1 1 parallel -j2 --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog | wc -lw; rm -f /tmp/joblog; echo '### Test --resume --joblog followed by --resume --joblog'; rm -f /tmp/joblog2; timeout -k 1 1 parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4 2>/dev/null; parallel -j2 --resume --joblog /tmp/joblog2 sleep {} ::: 1.1 2.2 3.3 4.4; cat /tmp/joblog2 | wc -lw; rm -f /tmp/joblog2; echo '### Test --header'
@ -141,92 +32,6 @@ echo "### bug #35268: shell_quote doesn't treats [] brackets correctly"
### bug #35268: shell_quote doesn't treats [] brackets correctly ### bug #35268: shell_quote doesn't treats [] brackets correctly
touch /tmp/foo1; stdout parallel echo ::: '/tmp/foo[123]'; rm /tmp/foo1 touch /tmp/foo1; stdout parallel echo ::: '/tmp/foo[123]'; rm /tmp/foo1
/tmp/foo[123] /tmp/foo[123]
echo '### Test basic --arg-sep'
### Test basic --arg-sep
parallel -k echo ::: a b
a
b
echo '### Run commands using --arg-sep'
### Run commands using --arg-sep
parallel -kv ::: 'echo a' 'echo b'
echo a
a
echo b
b
echo '### Change --arg-sep'
### Change --arg-sep
parallel --arg-sep ::: -kv ::: 'echo a' 'echo b'
echo a
a
echo b
b
parallel --arg-sep .--- -kv .--- 'echo a' 'echo b'
echo a
a
echo b
b
parallel --argsep ::: -kv ::: 'echo a' 'echo b'
echo a
a
echo b
b
parallel --argsep .--- -kv .--- 'echo a' 'echo b'
echo a
a
echo b
b
echo '### Test stdin goes to first command only'
### Test stdin goes to first command only
echo via cat |parallel --arg-sep .--- -kv .--- 'cat' 'echo b'
cat
echo b
b
echo via cat |parallel -kv ::: 'cat' 'echo b'
cat
echo b
b
echo '### Bug made 4 5 go before 1 2 3'
### Bug made 4 5 go before 1 2 3
parallel -k ::: "sleep 1; echo 1" "echo 2" "echo 3" "echo 4" "echo 5"
1
2
3
4
5
echo '### Bug made 3 go before 1 2'
### Bug made 3 go before 1 2
parallel -kj 1 ::: "sleep 1; echo 1" "echo 2" "echo 3"
1
2
3
echo '### Bug did not quote'
### Bug did not quote
echo '>' | parallel -v echo
echo '>'
>
parallel -v echo ::: '>'
echo '>'
>
(echo '>'; echo 2) | parallel -j1 -vX echo
echo '>' 2
> 2
parallel -X -j1 echo ::: '>' 2
> 2
echo '### Must not quote'; echo 'echo | wc -l' | parallel -v
### Must not quote
echo | wc -l
1
parallel -v ::: 'echo | wc -l'
echo | wc -l
1
echo 'echo a b c | wc -w' | parallel -v
echo a b c | wc -w
3
parallel -kv ::: 'echo a b c | wc -w' 'echo a b | wc -w'
echo a b c | wc -w
3
echo a b | wc -w
2
echo '### Test bug #35820: sem breaks if $HOME is not writable' echo '### Test bug #35820: sem breaks if $HOME is not writable'
### Test bug #35820: sem breaks if $HOME is not writable ### Test bug #35820: sem breaks if $HOME is not writable
echo 'Workaround: use another writable dir'; rm -rf /tmp/.parallel || echo /tmp/.parallel wrong owner?; HOME=/tmp sem echo OK; HOME=/tmp sem --wait; ssh lo 'HOME=/usr/this/should/fail stdout sem echo should fail' echo 'Workaround: use another writable dir'; rm -rf /tmp/.parallel || echo /tmp/.parallel wrong owner?; HOME=/tmp sem echo OK; HOME=/tmp sem --wait; ssh lo 'HOME=/usr/this/should/fail stdout sem echo should fail'

View file

@ -421,20 +421,3 @@ ghi jkl
$NICEPAR -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1} $NICEPAR -k -a <(printf 'def\tabc\njkl\tghi') --colsep '\t' echo {2} {1}
abc def abc def
ghi jkl ghi jkl
### Test of -j filename with file content changing (missing -k is correct)
sleep 3.3
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1.5
sleep 1.5
sleep 1.5
sleep 1.5
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1

View file

@ -1,7 +1,7 @@
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 90XXX
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 90XXX
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 90XXX
par_big_func 1 1XXX 46XXX par_big_func 1 1XXX 47XXX
par_big_func_name 18XXX par_big_func_name 18XXX
par_big_func_name 18XXX par_big_func_name 18XXX
par_big_func_name 18XXX par_big_func_name 18XXX
@ -65,7 +65,8 @@ par_many_func 1 196 4XXX
par_many_func 1 196 4XXX par_many_func 1 196 4XXX
par_many_func 1 196 4XXX par_many_func 1 196 4XXX
par_many_func 1 196 4XXX par_many_func 1 196 4XXX
par_many_func 1 200 4XXX par_many_func 1 196 4XXX
par_many_func 1 4 68
par_many_var 22XXX par_many_var 22XXX
par_many_var 22XXX par_many_var 22XXX
par_many_var 22XXX par_many_var 22XXX

View file

@ -16,7 +16,6 @@
perl -e 'printf "A_B_C_"' > abc_-file perl -e 'printf "A_B_C_"' > abc_-file
perl -e 'printf "f1\tf2\nA\tB\nC\tD\n"' > tsv-file.tsv perl -e 'printf "f1\tf2\nA\tB\nC\tD\n"' > tsv-file.tsv
perl -e 'for(1..8){print "$_\n"}' > num8 perl -e 'for(1..8){print "$_\n"}' > num8
perl -e 'for(1..128){print "$_\n"}' > num128
perl -e 'for(1..30000){print "$_\n"}' > num30000 perl -e 'for(1..30000){print "$_\n"}' > num30000
perl -e 'for(1..1000000){print "$_\n"}' > num1000000 perl -e 'for(1..1000000){print "$_\n"}' > num1000000
(echo %head1; echo %head2; \ (echo %head1; echo %head2; \
@ -145,7 +144,6 @@ abc_-file
def-file def-file
fixedlen fixedlen
num1000000 num1000000
num128
num30000 num30000
num8 num8
outdir outdir
@ -379,8 +377,6 @@ pre-A-post
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)' /usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
/usr/bin/bash: -c: line 1: `set a="num1000000"; if( { test -d "$a" } ) echo "$a is a dir"' /usr/bin/bash: -c: line 1: `set a="num1000000"; if( { test -d "$a" } ) echo "$a is a dir"'
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)' /usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
/usr/bin/bash: -c: line 1: `set a="num128"; if( { test -d "$a" } ) echo "$a is a dir"'
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
/usr/bin/bash: -c: line 1: `set a="num30000"; if( { test -d "$a" } ) echo "$a is a dir"' /usr/bin/bash: -c: line 1: `set a="num30000"; if( { test -d "$a" } ) echo "$a is a dir"'
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)' /usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
/usr/bin/bash: -c: line 1: `set a="num8"; if( { test -d "$a" } ) echo "$a is a dir"' /usr/bin/bash: -c: line 1: `set a="num8"; if( { test -d "$a" } ) echo "$a is a dir"'
@ -489,30 +485,13 @@ echo C
/usr/bin/bash: line 10: outdir/f1/B/f2/D/seq: No such file or directory /usr/bin/bash: line 10: outdir/f1/B/f2/D/seq: No such file or directory
/usr/bin/bash: line 11: outdir/f1/B/f2/D/stderr: No such file or directory /usr/bin/bash: line 11: outdir/f1/B/f2/D/stderr: No such file or directory
/usr/bin/bash: line 12: outdir/f1/B/f2/D/stdout: No such file or directory /usr/bin/bash: line 12: outdir/f1/B/f2/D/stdout: No such file or directory
/usr/bin/time -f %e parallel -N0 -j64 sleep 1 :::: num128
9
/usr/bin/time -f %e parallel -N0 sleep 1 :::: num128
99
/usr/bin/time -f %e parallel -N0 --jobs 200% sleep 1 :::: num128
9
/usr/bin/time -f %e parallel -N0 --jobs 0 sleep 1 :::: num128
9
echo 50% > my_jobs echo 50% > my_jobs
/usr/bin/time -f %e parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
sleep 1 sleep 1
echo 0 > my_jobs echo 0 > my_jobs
wait wait
parallel: Warning: Only enough file handles to run 247 jobs in parallel.
parallel: Warning: Try running 'parallel -j0 -N 247 --pipe parallel -j0'
parallel: Warning: or increasing 'ulimit -n' (try: ulimit -n `ulimit -Hn`)
parallel: Warning: or increasing 'nofile' in /etc/security/limits.conf
parallel: Warning: or increasing /proc/sys/fs/file-max
9
parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8 parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8
parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C
123 abc ABC 123 abc ABC
seq 10 20 | parallel --tmux 'echo start {}; sleep {}; echo done {}'
See output with: tmux -S /TMP/tmsXXXXX attach
tmux -S /tmp/tmsXXXXX attach tmux -S /tmp/tmsXXXXX attach
no sessions no sessions
parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3 parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
@ -594,7 +573,6 @@ Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
2 : TIMESTAMP 9.999 0 0 2 0 exit 2 2 : TIMESTAMP 9.999 0 0 2 0 exit 2
3 : TIMESTAMP 9.999 0 0 3 0 exit 3 3 : TIMESTAMP 9.999 0 0 3 0 exit 3
9 9
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3 parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
9 9
parallel -j2 --halt soon,fail=20% echo {}\; exit {} \ parallel -j2 --halt soon,fail=20% echo {}\; exit {} \
@ -696,9 +674,6 @@ foo
9 9
parallel --controlmaster -S $SERVER1 echo ::: 1 2 3 parallel --controlmaster -S $SERVER1 echo ::: 1 2 3
9 9
parallel --filter-hosts -S 173.194.32.46,$SERVER1 echo ::: bar
bar
parallel: Warning: Removed 173.194.32.46.
parallel --onall -S $SERVER1,$SERVER2 echo ::: foo bar parallel --onall -S $SERVER1,$SERVER2 echo ::: foo bar
foo foo
bar bar
@ -1221,23 +1196,6 @@ The second is now running in the background
The first finished The first finished
The first finished running in the foreground The first finished running in the foreground
The second finished running in the foreground The second finished running in the foreground
sem --id my_id -u 'echo First started; sleep 10; echo First done'
First started
First done
sem --id my_id -u 'echo Second started; sleep 10; echo Second done'
sem --jobs 3 --id my_id -u 'echo Start 1; sleep 5; echo 1 done' &&
sem --jobs 3 --id my_id -u 'echo Start 2; sleep 6; echo 2 done' &&
sem --jobs 3 --id my_id -u 'echo Start 3; sleep 7; echo 3 done' &&
sem --jobs 3 --id my_id -u 'echo Start 4; sleep 8; echo 4 done' &&
sem --wait --id my_id
Start 1
Start 2
1 done
Start 3
2 done
Start 4
3 done
4 done
sem --id foo -u 'echo Slow started; sleep 5; echo Slow ended' && sem --id foo -u 'echo Slow started; sleep 5; echo Slow ended' &&
sem --id foo --semaphoretimeout 1 'echo Forced running after 1 sec' && sem --id foo --semaphoretimeout 1 'echo Forced running after 1 sec' &&
sem --id foo --semaphoretimeout -2 'echo Give up after 2 secs' sem --id foo --semaphoretimeout -2 'echo Give up after 2 secs'