mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: -a file1 -a +file2 will link file2 to file1.
This commit is contained in:
parent
4c3396c31c
commit
2bc95e8f06
12
NEWS
12
NEWS
|
@ -1,3 +1,15 @@
|
|||
20231122
|
||||
|
||||
New in this release:
|
||||
|
||||
* -a file1 -a +file2 will link file2 to file1 similar to ::::+
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
News about GNU Parallel:
|
||||
|
||||
|
||||
|
||||
20231022
|
||||
|
||||
New in this release:
|
||||
|
|
|
@ -274,24 +274,23 @@ from:tange@gnu.org
|
|||
to:parallel@gnu.org, bug-parallel@gnu.org
|
||||
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
|
||||
|
||||
Subject: GNU Parallel 20231022 ('Al-Aqsa Deluge') released [stable]
|
||||
Subject: GNU Parallel 20231122 ('Perry<<>>') released <<[stable]>>
|
||||
|
||||
GNU Parallel 20231022 ('Al-Aqsa Deluge') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
GNU Parallel 20231122 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
|
||||
Quote of the month:
|
||||
|
||||
Love to make a dual processor workstation absolutely whir running dozens of analysis scripts at once
|
||||
-- Best Catboy Key Grip @alamogordoglass@twitter
|
||||
<<>>
|
||||
|
||||
New in this release:
|
||||
|
||||
* -a file1 -a +file2 will link file2 to file1 similar to ::::+
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
News about GNU Parallel:
|
||||
|
||||
* Resume long parallel jobs https://ginolhac.github.io/posts/2023-10-02_resume-parallel/index.html
|
||||
|
||||
* Efficiency and Speed with GNU Parallel https://dev.to/0xog_pg/efficiency-and-speed-with-gnu-parallel-loo
|
||||
<<>>
|
||||
|
||||
|
||||
GNU Parallel - For people who live life in the parallel lane.
|
||||
|
|
176
src/parallel
176
src/parallel
|
@ -2522,10 +2522,8 @@ sub parse_options(@) {
|
|||
not ($opt::xargs or $opt::m)) {
|
||||
$Global::ContextReplace = 1;
|
||||
}
|
||||
if(grep /^$Global::arg_sep\+?$|^$Global::arg_file_sep\+?$/o, @ARGV) {
|
||||
# Deal with ::: :::+ :::: and ::::+
|
||||
# Deal with ::: :::+ :::: ::::+ and -a +file
|
||||
@ARGV = read_args_from_command_line();
|
||||
}
|
||||
parse_semaphore();
|
||||
|
||||
if(defined $opt::eta) { $opt::progress = $opt::eta; }
|
||||
|
@ -3524,76 +3522,136 @@ sub read_args_from_command_line() {
|
|||
# @opt::a
|
||||
# Returns:
|
||||
# @argv_no_argsep = @::ARGV without ::: and :::: and following args
|
||||
my @new_argv = ();
|
||||
for(my $arg = shift @ARGV; @ARGV; $arg = shift @ARGV) {
|
||||
if($arg eq $Global::arg_sep
|
||||
or
|
||||
$arg eq $Global::arg_sep."+"
|
||||
or
|
||||
$arg eq $Global::arg_file_sep
|
||||
or
|
||||
$arg eq $Global::arg_file_sep."+") {
|
||||
my $group_sep = $arg; # This group of args is args or argfiles
|
||||
my @group;
|
||||
while(defined ($arg = shift @ARGV)) {
|
||||
if($arg eq $Global::arg_sep
|
||||
or
|
||||
$arg eq $Global::arg_sep."+"
|
||||
or
|
||||
$arg eq $Global::arg_file_sep
|
||||
or
|
||||
$arg eq $Global::arg_file_sep."+") {
|
||||
# exit while loop if finding new separator
|
||||
my %group_sep = ($Global::arg_sep => ":::",
|
||||
$Global::arg_sep."+" => ":::+",
|
||||
$Global::arg_file_sep => "::::",
|
||||
$Global::arg_file_sep."+" => "::::+");
|
||||
sub is_linked($) {
|
||||
# file is linked if file starts with +
|
||||
local $_ = shift;
|
||||
if(/^\+(.*)/) {
|
||||
my $noplus = $1;
|
||||
if(-e $_ and -e $noplus) {
|
||||
::error("It is unclear whether you mean +./$noplus or ./+$noplus");
|
||||
wait_and_exit(255);
|
||||
} elsif(-e $_ and not -e $noplus) {
|
||||
# This is ./+file = this is not linked
|
||||
return 0;
|
||||
} elsif(not -e $_ and -e $noplus) {
|
||||
# This is +./file = this is linked
|
||||
return 1;
|
||||
} elsif(not -e $_ and not -e $noplus) {
|
||||
# File does not exist, maybe it is stdin?
|
||||
if($_ eq "-") {
|
||||
# This is - = this is not linked
|
||||
return 0;
|
||||
} elsif($_ eq "+-") {
|
||||
# This is +- = this is linked
|
||||
return 1;
|
||||
} else {
|
||||
::error("File not found: $_");
|
||||
wait_and_exit(255);
|
||||
}
|
||||
} else {
|
||||
::die_bug("noplus: $noplus $_");
|
||||
}
|
||||
}
|
||||
# not linked
|
||||
return 0;
|
||||
}
|
||||
sub cmd_template() {
|
||||
# remove command template from @ARGV
|
||||
# keep ::: / :::: in @ARGV if any
|
||||
my @cmd_template;
|
||||
while(@ARGV) {
|
||||
my $arg = shift @ARGV;
|
||||
if($group_sep{$arg}) {
|
||||
# Found separator: push it back and exit loop
|
||||
unshift @ARGV, $arg;
|
||||
last;
|
||||
}
|
||||
push @cmd_template, $arg;
|
||||
}
|
||||
return @cmd_template;
|
||||
}
|
||||
sub divide_into_groups() {
|
||||
# Split arguments from @ARGV into groups:
|
||||
# ::: 1 2 3 :::: a b c ::::+ d e f
|
||||
# =>
|
||||
# [ ::: 1 2 3 ], [ :::: a b c ], [ ::::+ d e f ]
|
||||
my @g;
|
||||
my @grp;
|
||||
while(@ARGV) {
|
||||
my $arg = shift @ARGV;
|
||||
if($group_sep{$arg}) {
|
||||
# start a new group
|
||||
push @grp, [@g];
|
||||
@g = ($group_sep{$arg});
|
||||
} else {
|
||||
# If not hitting ::: :::+ :::: or ::::+
|
||||
# Append it to the group
|
||||
push @group, $arg;
|
||||
push @g, $arg;
|
||||
}
|
||||
}
|
||||
my $is_linked = ($group_sep =~ /\+$/) ? 1 : 0;
|
||||
my $is_file = ($group_sep eq $Global::arg_file_sep
|
||||
or
|
||||
$group_sep eq $Global::arg_file_sep."+");
|
||||
if($is_file) {
|
||||
# :::: / ::::+
|
||||
push @opt::linkinputsource, map { $is_linked } @group;
|
||||
} else {
|
||||
# ::: / :::+
|
||||
push @opt::linkinputsource, $is_linked;
|
||||
push @grp, [@g];
|
||||
shift @grp; # The first will always be empty
|
||||
return @grp;
|
||||
}
|
||||
if($is_file
|
||||
or ($opt::_pipe_means_argfiles and $opt::pipe)
|
||||
) {
|
||||
# Group of file names on the command line.
|
||||
# Append args into -a
|
||||
push @opt::a, @group;
|
||||
} else {
|
||||
# Group of arguments on the command line.
|
||||
# Put them into a file.
|
||||
sub save_to_file(@) {
|
||||
# Put args into a file, return open file handle of file
|
||||
# Create argfile
|
||||
my ($outfh,$name) = ::tmpfile(SUFFIX => ".arg");
|
||||
my ($fh,$name) = ::tmpfile(SUFFIX => ".arg");
|
||||
unlink($name);
|
||||
# Put args into argfile
|
||||
print $outfh map { $_,$/ } @group;
|
||||
seek $outfh, 0, 0;
|
||||
print $fh map { $_,$/ } @_;
|
||||
seek $fh, 0, 0;
|
||||
exit_if_disk_full();
|
||||
# Append filehandle to -a
|
||||
push @opt::a, $outfh;
|
||||
return $fh;
|
||||
}
|
||||
if(defined($arg)) {
|
||||
# $arg is ::: :::+ :::: or ::::+
|
||||
# so there is another group
|
||||
redo;
|
||||
my @cmd = cmd_template();
|
||||
# The rest of @ARGV is ::: / :::: args
|
||||
# If there are any -a: Rewrite them to use ::::
|
||||
if(@opt::a) { unshift @ARGV, $Global::arg_file_sep, @opt::a; }
|
||||
@opt::a = ();
|
||||
# Convert ::: and :::: into (linked) files and put those into @opt::a
|
||||
for my $g_ref (divide_into_groups()) {
|
||||
my $group_sep = shift @$g_ref;
|
||||
if($group_sep eq ":::" or $group_sep eq ":::+") {
|
||||
# Group starts with ::: / :::+
|
||||
if($opt::_pipe_means_argfiles and $#$g_ref < 0) {
|
||||
# TODO
|
||||
# Deal with --shebang-wrap and ::: on the shebang line
|
||||
} else {
|
||||
# $arg is undef -> @ARGV empty
|
||||
last;
|
||||
push @opt::a, save_to_file(@$g_ref);
|
||||
# if $group_sep == ":::+": it is linked
|
||||
push @opt::linkinputsource, ($group_sep eq ":::+");
|
||||
}
|
||||
} elsif($group_sep eq "::::" or $group_sep eq "::::+") {
|
||||
# Group starts with :::: / ::::+
|
||||
for my $f (@$g_ref) {
|
||||
if($group_sep eq "::::+") {
|
||||
# Linking forced
|
||||
push @opt::a, $f;
|
||||
push @opt::linkinputsource, 1;
|
||||
} elsif($group_sep eq "::::") {
|
||||
# Auto detect linking
|
||||
if(is_linked($f)) {
|
||||
# +file
|
||||
push @opt::linkinputsource, 1;
|
||||
$f =~ s/^\+//;
|
||||
} else {
|
||||
# file (no plus)
|
||||
push @opt::linkinputsource, 0;
|
||||
}
|
||||
push @opt::a, $f;
|
||||
} else {
|
||||
::die_bug("arg link error");
|
||||
}
|
||||
}
|
||||
push @new_argv, $arg;
|
||||
} else {
|
||||
::die_bug("arg link error");
|
||||
}
|
||||
# Output: @ARGV = command to run with options
|
||||
return @new_argv;
|
||||
}
|
||||
# Output: command to run with options
|
||||
return @cmd;
|
||||
}
|
||||
|
||||
sub cleanup() {
|
||||
|
|
|
@ -536,16 +536,12 @@ Shorthand for B<--delimiter '\0'>.
|
|||
See also: B<--delimiter>
|
||||
|
||||
|
||||
=item B<--arg-file> I<input-file>
|
||||
=item B<--arg-file> I<input-file> (alpha testing)
|
||||
|
||||
=item B<-a> I<input-file>
|
||||
=item B<-a> I<input-file> (alpha testing)
|
||||
|
||||
Use I<input-file> as input source.
|
||||
|
||||
If you use this option, stdin (standard input) is given to the first
|
||||
process run. Otherwise, stdin (standard input) is redirected from
|
||||
/dev/null.
|
||||
|
||||
If multiple B<--arg-file> are given, each I<input-file> will be treated as an
|
||||
input source, and all combinations of input sources will be
|
||||
generated. E.g. The file B<foo> contains B<1 2>, the file
|
||||
|
@ -553,6 +549,12 @@ B<bar> contains B<a b c>. B<-a foo> B<-a bar> will result in the combinations
|
|||
(1,a) (1,b) (1,c) (2,a) (2,b) (2,c). This is useful for replacing
|
||||
nested for-loops.
|
||||
|
||||
If I<input-file> starts with B<+> the file will be linked to the
|
||||
previous B<--arg-file> E.g. The file B<foo> contains B<1 2>, the file
|
||||
B<bar> contains B<a b>. B<-a foo> B<-a +bar> will result in the
|
||||
combinations (1,a) (2,b) like B<--link> instead of generating all
|
||||
combinations.
|
||||
|
||||
See also: B<--link> B<{>I<n>B<}> B<::::> B<::::+> B<:::>
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,53 @@
|
|||
# Each should be taking 3-10s and be possible to run in parallel
|
||||
# I.e.: No race conditions, no logins
|
||||
|
||||
par__argfile_plus() {
|
||||
tmp=$(mktemp -d)
|
||||
(
|
||||
p() {
|
||||
echo -- -a $1 $2 $3
|
||||
stdout parallel -k -a $1 -a $2 -a $3 echo;
|
||||
}
|
||||
q() {
|
||||
echo :::: $1 $2 $3
|
||||
stdout parallel -k echo :::: $1 $2 $3;
|
||||
}
|
||||
cd "$tmp"
|
||||
seq 3 > file
|
||||
seq 4 6 > +file
|
||||
seq 7 9 > ++file
|
||||
|
||||
p file +file ++file
|
||||
p file +./file ++file
|
||||
p file ./+file ++file
|
||||
|
||||
p file +file +./+file
|
||||
p file +./file +./+file
|
||||
p file ./+file +./+file
|
||||
|
||||
p file +file ./++file
|
||||
p file +./file ./++file
|
||||
p file ./+file ./++file
|
||||
|
||||
q file +file ++file
|
||||
q file +./file ++file
|
||||
q file ./+file ++file
|
||||
|
||||
q file +file +./+file
|
||||
q file +./file +./+file
|
||||
q file ./+file +./+file
|
||||
|
||||
q file +file ./++file
|
||||
q file +./file ./++file
|
||||
q file ./+file ./++file
|
||||
|
||||
seq 10 12 | p ./file ./++file -
|
||||
seq 10 12 | p ./file +./+file +-
|
||||
seq 10 12 | p ./file +- ./+file
|
||||
)
|
||||
rm -r "$tmp"
|
||||
}
|
||||
|
||||
par_process_slot_var() {
|
||||
echo '### bug #62310: xargs compatibility: --process-slot-var=name'
|
||||
seq 0.1 0.4 1.8 |
|
||||
|
|
|
@ -50,4 +50,4 @@ par_load_file_more_10s() {
|
|||
export -f $(compgen -A function | grep par_)
|
||||
#compgen -A function | grep par_ | sort | parallel --delay $D -j$P --tag -k '{} 2>&1'
|
||||
compgen -A function | grep par_ | sort |
|
||||
parallel --joblog /tmp/jl-`basename $0` -j200% --tag -k '{} 2>&1'
|
||||
parallel --timeout 30s --joblog /tmp/jl-`basename $0` -j200% --tag -k '{} 2>&1'
|
||||
|
|
|
@ -120,7 +120,13 @@ perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' "$testsuit
|
|||
s:par......par:tempfile:g;
|
||||
s:^tempfile\n::g;
|
||||
# --progress => 1:local / 4 / 4
|
||||
s,1:local / . / .,1:local / 9 / 9,
|
||||
s,1:local / . / .,1:local / 9 / 9,;
|
||||
# bash: -c: line 1: .set a="tempfile"; if( { test -d "$a" } ) echo "$a is a dir"
|
||||
s{.*bash: .*set a=".*".*test -d.*is a dir.*\n}{};
|
||||
# /usr/bin/bash: -c: line 1: syntax error near unexpected token .)
|
||||
s{.*bash: .*syntax error near unexpected token.*\n}{};
|
||||
# This is input_file
|
||||
s{^This is input_file.*\n}{};
|
||||
' | uniq
|
||||
|
||||
echo "### 3+3 .par files (from --files), 1 .tms-file from tmux attach"
|
||||
|
|
|
@ -12,6 +12,172 @@ 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__argfile_plus -- -a file +file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus -- -a file +./file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./+file or ./++file
|
||||
par__argfile_plus -- -a file ./+file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./+file or ./++file
|
||||
par__argfile_plus -- -a file +file +./+file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus -- -a file +./file +./+file
|
||||
par__argfile_plus 1 1 4
|
||||
par__argfile_plus 2 2 5
|
||||
par__argfile_plus 3 3 6
|
||||
par__argfile_plus -- -a file ./+file +./+file
|
||||
par__argfile_plus 1 4 4
|
||||
par__argfile_plus 1 5 5
|
||||
par__argfile_plus 1 6 6
|
||||
par__argfile_plus 2 4 4
|
||||
par__argfile_plus 2 5 5
|
||||
par__argfile_plus 2 6 6
|
||||
par__argfile_plus 3 4 4
|
||||
par__argfile_plus 3 5 5
|
||||
par__argfile_plus 3 6 6
|
||||
par__argfile_plus -- -a file +file ./++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus -- -a file +./file ./++file
|
||||
par__argfile_plus 1 1 7
|
||||
par__argfile_plus 1 1 8
|
||||
par__argfile_plus 1 1 9
|
||||
par__argfile_plus 2 2 7
|
||||
par__argfile_plus 2 2 8
|
||||
par__argfile_plus 2 2 9
|
||||
par__argfile_plus 3 3 7
|
||||
par__argfile_plus 3 3 8
|
||||
par__argfile_plus 3 3 9
|
||||
par__argfile_plus -- -a file ./+file ./++file
|
||||
par__argfile_plus 1 4 7
|
||||
par__argfile_plus 1 4 8
|
||||
par__argfile_plus 1 4 9
|
||||
par__argfile_plus 1 5 7
|
||||
par__argfile_plus 1 5 8
|
||||
par__argfile_plus 1 5 9
|
||||
par__argfile_plus 1 6 7
|
||||
par__argfile_plus 1 6 8
|
||||
par__argfile_plus 1 6 9
|
||||
par__argfile_plus 2 4 7
|
||||
par__argfile_plus 2 4 8
|
||||
par__argfile_plus 2 4 9
|
||||
par__argfile_plus 2 5 7
|
||||
par__argfile_plus 2 5 8
|
||||
par__argfile_plus 2 5 9
|
||||
par__argfile_plus 2 6 7
|
||||
par__argfile_plus 2 6 8
|
||||
par__argfile_plus 2 6 9
|
||||
par__argfile_plus 3 4 7
|
||||
par__argfile_plus 3 4 8
|
||||
par__argfile_plus 3 4 9
|
||||
par__argfile_plus 3 5 7
|
||||
par__argfile_plus 3 5 8
|
||||
par__argfile_plus 3 5 9
|
||||
par__argfile_plus 3 6 7
|
||||
par__argfile_plus 3 6 8
|
||||
par__argfile_plus 3 6 9
|
||||
par__argfile_plus :::: file +file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus :::: file +./file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./+file or ./++file
|
||||
par__argfile_plus :::: file ./+file ++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./+file or ./++file
|
||||
par__argfile_plus :::: file +file +./+file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus :::: file +./file +./+file
|
||||
par__argfile_plus 1 1 4
|
||||
par__argfile_plus 2 2 5
|
||||
par__argfile_plus 3 3 6
|
||||
par__argfile_plus :::: file ./+file +./+file
|
||||
par__argfile_plus 1 4 4
|
||||
par__argfile_plus 1 5 5
|
||||
par__argfile_plus 1 6 6
|
||||
par__argfile_plus 2 4 4
|
||||
par__argfile_plus 2 5 5
|
||||
par__argfile_plus 2 6 6
|
||||
par__argfile_plus 3 4 4
|
||||
par__argfile_plus 3 5 5
|
||||
par__argfile_plus 3 6 6
|
||||
par__argfile_plus :::: file +file ./++file
|
||||
par__argfile_plus parallel: Error: It is unclear whether you mean +./file or ./+file
|
||||
par__argfile_plus :::: file +./file ./++file
|
||||
par__argfile_plus 1 1 7
|
||||
par__argfile_plus 1 1 8
|
||||
par__argfile_plus 1 1 9
|
||||
par__argfile_plus 2 2 7
|
||||
par__argfile_plus 2 2 8
|
||||
par__argfile_plus 2 2 9
|
||||
par__argfile_plus 3 3 7
|
||||
par__argfile_plus 3 3 8
|
||||
par__argfile_plus 3 3 9
|
||||
par__argfile_plus :::: file ./+file ./++file
|
||||
par__argfile_plus 1 4 7
|
||||
par__argfile_plus 1 4 8
|
||||
par__argfile_plus 1 4 9
|
||||
par__argfile_plus 1 5 7
|
||||
par__argfile_plus 1 5 8
|
||||
par__argfile_plus 1 5 9
|
||||
par__argfile_plus 1 6 7
|
||||
par__argfile_plus 1 6 8
|
||||
par__argfile_plus 1 6 9
|
||||
par__argfile_plus 2 4 7
|
||||
par__argfile_plus 2 4 8
|
||||
par__argfile_plus 2 4 9
|
||||
par__argfile_plus 2 5 7
|
||||
par__argfile_plus 2 5 8
|
||||
par__argfile_plus 2 5 9
|
||||
par__argfile_plus 2 6 7
|
||||
par__argfile_plus 2 6 8
|
||||
par__argfile_plus 2 6 9
|
||||
par__argfile_plus 3 4 7
|
||||
par__argfile_plus 3 4 8
|
||||
par__argfile_plus 3 4 9
|
||||
par__argfile_plus 3 5 7
|
||||
par__argfile_plus 3 5 8
|
||||
par__argfile_plus 3 5 9
|
||||
par__argfile_plus 3 6 7
|
||||
par__argfile_plus 3 6 8
|
||||
par__argfile_plus 3 6 9
|
||||
par__argfile_plus -- -a ./file ./++file -
|
||||
par__argfile_plus 1 7 10
|
||||
par__argfile_plus 1 7 11
|
||||
par__argfile_plus 1 7 12
|
||||
par__argfile_plus 1 8 10
|
||||
par__argfile_plus 1 8 11
|
||||
par__argfile_plus 1 8 12
|
||||
par__argfile_plus 1 9 10
|
||||
par__argfile_plus 1 9 11
|
||||
par__argfile_plus 1 9 12
|
||||
par__argfile_plus 2 7 10
|
||||
par__argfile_plus 2 7 11
|
||||
par__argfile_plus 2 7 12
|
||||
par__argfile_plus 2 8 10
|
||||
par__argfile_plus 2 8 11
|
||||
par__argfile_plus 2 8 12
|
||||
par__argfile_plus 2 9 10
|
||||
par__argfile_plus 2 9 11
|
||||
par__argfile_plus 2 9 12
|
||||
par__argfile_plus 3 7 10
|
||||
par__argfile_plus 3 7 11
|
||||
par__argfile_plus 3 7 12
|
||||
par__argfile_plus 3 8 10
|
||||
par__argfile_plus 3 8 11
|
||||
par__argfile_plus 3 8 12
|
||||
par__argfile_plus 3 9 10
|
||||
par__argfile_plus 3 9 11
|
||||
par__argfile_plus 3 9 12
|
||||
par__argfile_plus -- -a ./file +./+file +-
|
||||
par__argfile_plus 1 4 10
|
||||
par__argfile_plus 2 5 11
|
||||
par__argfile_plus 3 6 12
|
||||
par__argfile_plus -- -a ./file +- ./+file
|
||||
par__argfile_plus 1 10 4
|
||||
par__argfile_plus 1 10 5
|
||||
par__argfile_plus 1 10 6
|
||||
par__argfile_plus 2 11 4
|
||||
par__argfile_plus 2 11 5
|
||||
par__argfile_plus 2 11 6
|
||||
par__argfile_plus 3 12 4
|
||||
par__argfile_plus 3 12 5
|
||||
par__argfile_plus 3 12 6
|
||||
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
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
160d3159 9480cf5c a101512f 150b7ac0 206a65dc 86f2bb6b bdf1a2bc 96bc6d06
|
||||
7f8237c2 0964b67f bccf8a93 332528fa 11e5ab43 2a6226a6 ceb197ab 7f03c061
|
||||
$ bash install.sh
|
||||
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
|
||||
/usr/bin/bash: -c: line 1: ` fetch -o - http://pi.dk/3 ) > install.sh'
|
||||
parallel -k echo ::: A B C > abc-file
|
||||
parallel -k echo ::: D E F > def-file
|
||||
|
@ -23,7 +22,6 @@ sleep .3
|
|||
/usr/bin/bash: -c: line 3: syntax error: unexpected end of file
|
||||
sleep .3
|
||||
perl -e 'for(1..10){print "$_\n"}') > num_%header
|
||||
/usr/bin/bash: -c: line 1: syntax error near unexpected token `)'
|
||||
/usr/bin/bash: -c: line 1: ` perl -e 'for(1..10){print "$_\n"}') > num_%header'
|
||||
perl -e 'print "HHHHAAABBBCCC"' > fixedlen
|
||||
parallel echo ::: A B C
|
||||
|
@ -351,7 +349,6 @@ foo
|
|||
perl -e 'print "@ARGV\n"'
|
||||
[CTRL-D]
|
||||
/usr/bin/bash: line 2: Warning:: command not found
|
||||
/usr/bin/bash: -c: line 3: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 3: ` Warning: are doing (in which case: YOU ARE AWESOME!) or you forgot'
|
||||
parallel --trim r echo pre-{}-post ::: ' A '
|
||||
pre- A-post
|
||||
|
@ -364,26 +361,6 @@ pre-A-post
|
|||
=bash
|
||||
=ls
|
||||
parallel 'set a="{}"; 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="abc-file"; 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="abc0-file"; 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="abc_-file"; 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="def-file"; 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="fixedlen"; 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="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: `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: `set a="num8"; 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="outdir"; 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="tsv-file.tsv"; if( { test -d "$a" } ) echo "$a is a dir"'
|
||||
parallel --tag echo foo-{} ::: A B C
|
||||
A foo-A
|
||||
B foo-B
|
||||
|
@ -644,21 +621,17 @@ run_on_grp1
|
|||
run_on_grp2
|
||||
echo This is input_file > input_file
|
||||
parallel -S $SERVER1 --transferfile {} cat ::: input_file
|
||||
This is input_file
|
||||
echo This is input_file > input_file
|
||||
parallel -S $SERVER1 --transferfile {} --return {}.out \
|
||||
cat {} ">"{}.out ::: input_file
|
||||
cat input_file.out
|
||||
This is input_file
|
||||
echo This is input_file > input_file
|
||||
parallel -S $SERVER1 --transferfile {} --return {}.out --cleanup \
|
||||
cat {} ">"{}.out ::: input_file
|
||||
cat input_file.out
|
||||
This is input_file
|
||||
echo This is input_file > input_file
|
||||
parallel -S $SERVER1 --trc {}.out cat {} ">"{}.out ::: input_file
|
||||
cat input_file.out
|
||||
This is input_file
|
||||
echo common data > common_file
|
||||
parallel --basefile common_file -S $SERVER1 \
|
||||
cat common_file\; echo {} ::: foo
|
||||
|
@ -1107,7 +1080,6 @@ Warning: unknown mime-type for "Arguments @ARGV\n" -- using "application/octet-s
|
|||
Error: no such file "Arguments @ARGV\n"
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/python
|
||||
print 'Arguments', str(sys.argv)
|
||||
/usr/bin/bash: -c: line 4: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 4: ` print 'Arguments', str(sys.argv)'
|
||||
#!/usr/bin/parallel --shebang-wrap /bin/bash
|
||||
echo Arguments "$@"
|
||||
|
@ -1121,11 +1093,9 @@ Arguments
|
|||
#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
print(paste("Arguments ",args))
|
||||
/usr/bin/bash: -c: line 3: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 3: ` args <- commandArgs(trailingOnly = TRUE)'
|
||||
#!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
|
||||
print "Arguments ", system('echo $ARG')
|
||||
/usr/bin/bash: -c: line 3: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 3: ` print "Arguments ", system('echo $ARG')'
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
|
||||
print "Arguments "
|
||||
|
@ -1140,7 +1110,6 @@ Error: no such file "Arguments "
|
|||
printf (" %s", arg_list{i});
|
||||
endfor
|
||||
printf ("\n");
|
||||
/usr/bin/bash: -c: line 3: syntax error near unexpected token `"Arguments"'
|
||||
/usr/bin/bash: -c: line 3: ` printf ("Arguments");'
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
|
||||
(format t "~&~S~&" 'Arguments)
|
||||
|
@ -1158,12 +1127,10 @@ Error: no such file "Arguments "
|
|||
?>
|
||||
Arguments
|
||||
/usr/bin/bash: line 2: ?php: No such file or directory
|
||||
/usr/bin/bash: -c: line 4: syntax error near unexpected token `array_slice'
|
||||
/usr/bin/bash: -c: line 4: ` foreach(array_slice($argv,1) as $v)'
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/node
|
||||
var myArgs = process.argv.slice(2);
|
||||
console.log('Arguments ', myArgs);
|
||||
/usr/bin/bash: -c: line 1: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 1: ` var myArgs = process.argv.slice(2);'
|
||||
#!/usr/bin/parallel --shebang-wrap /usr/bin/lua
|
||||
io.write "Arguments"
|
||||
|
@ -1173,12 +1140,10 @@ Arguments
|
|||
end
|
||||
print(")
|
||||
/usr/bin/bash: line 3: io.write: command not found
|
||||
/usr/bin/bash: -c: line 4: syntax error near unexpected token `='
|
||||
/usr/bin/bash: -c: line 4: ` for a = 1, #arg do'
|
||||
#!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
|
||||
var argv = Environment.GetEnvironmentVariable("ARGV");
|
||||
print("Arguments "+argv);
|
||||
/usr/bin/bash: -c: line 3: syntax error near unexpected token `('
|
||||
/usr/bin/bash: -c: line 3: ` var argv = Environment.GetEnvironmentVariable("ARGV");'
|
||||
sem 'sleep 1; echo The first finished' &&
|
||||
echo The first is now running in the background &&
|
||||
|
|
Loading…
Reference in a new issue