mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
parent
c871cdd0a3
commit
4ec701807e
56
src/parallel
56
src/parallel
|
@ -1016,8 +1016,10 @@ sub parse_options {
|
|||
$opt::compress_program ||= $compress;
|
||||
$opt::decompress_program ||= $decompress;
|
||||
}
|
||||
if(defined $opt::nonall) {
|
||||
# Append a dummy empty argument
|
||||
if(defined $opt::nonall
|
||||
and not grep /\Q$Global::arg_sep\E|\Q$Global::arg_sep\E/, @ARGV) {
|
||||
# Append a dummy empty argument if there are no arguments
|
||||
# on the command line to avoid reading from STDIN.
|
||||
# \0 => nothing (not the empty string)
|
||||
push @ARGV, $Global::arg_sep, "\0";
|
||||
}
|
||||
|
@ -3118,7 +3120,7 @@ sub onall {
|
|||
# Copy all @input_source_fh (-a and :::) into tempfiles
|
||||
my @argfiles = ();
|
||||
for my $fh (@$input_source_fh_ref) {
|
||||
my ($outfh, $name) = ::tmpfile(SUFFIX => ".all", UNLINK => 1);
|
||||
my ($outfh, $name) = ::tmpfile(SUFFIX => ".all", UNLINK => not $opt::D);
|
||||
print $outfh (<$fh>);
|
||||
close $outfh;
|
||||
push @argfiles, $name;
|
||||
|
@ -3131,32 +3133,37 @@ sub onall {
|
|||
# -P should only go to the first, and -S should not be copied at all.
|
||||
my $options =
|
||||
join(" ",
|
||||
((defined $opt::jobs) ? "-P $opt::jobs" : ""),
|
||||
((defined $opt::linebuffer) ? "--linebuffer" : ""),
|
||||
((defined $opt::ungroup) ? "-u" : ""),
|
||||
((defined $opt::group) ? "-g" : ""),
|
||||
((defined $opt::keeporder) ? "--keeporder" : ""),
|
||||
((defined $opt::D) ? "-D $opt::D" : ""),
|
||||
((defined $opt::plain) ? "--plain" : ""),
|
||||
((defined $opt::group) ? "-g" : ""),
|
||||
((defined $opt::jobs) ? "-P $opt::jobs" : ""),
|
||||
((defined $opt::keeporder) ? "--keeporder" : ""),
|
||||
((defined $opt::linebuffer) ? "--linebuffer" : ""),
|
||||
((defined $opt::max_chars) ? "--max-chars ".$opt::max_chars : ""),
|
||||
((defined $opt::plain) ? "--plain" : ""),
|
||||
((defined $opt::ungroup) ? "-u" : ""),
|
||||
);
|
||||
my $suboptions =
|
||||
join(" ",
|
||||
((defined $opt::ungroup) ? "-u" : ""),
|
||||
((defined $opt::linebuffer) ? "--linebuffer" : ""),
|
||||
((defined $opt::group) ? "-g" : ""),
|
||||
((defined $opt::files) ? "--files" : ""),
|
||||
((defined $opt::keeporder) ? "--keeporder" : ""),
|
||||
((defined $opt::colsep) ? "--colsep ".shell_quote($opt::colsep) : ""),
|
||||
((@opt::v) ? "-vv" : ""),
|
||||
((defined $opt::D) ? "-D $opt::D" : ""),
|
||||
((defined $opt::timeout) ? "--timeout ".$opt::timeout : ""),
|
||||
((defined $opt::arg_file_sep) ? "--arg-file-sep ".$opt::arg_file_sep : ""),
|
||||
((defined $opt::arg_sep) ? "--arg-sep ".$opt::arg_sep : ""),
|
||||
((defined $opt::colsep) ? "--colsep ".shell_quote($opt::colsep) : ""),
|
||||
((defined $opt::files) ? "--files" : ""),
|
||||
((defined $opt::group) ? "-g" : ""),
|
||||
((defined $opt::cleanup) ? "--cleanup" : ""),
|
||||
((defined $opt::keeporder) ? "--keeporder" : ""),
|
||||
((defined $opt::linebuffer) ? "--linebuffer" : ""),
|
||||
((defined $opt::max_chars) ? "--max-chars ".$opt::max_chars : ""),
|
||||
((defined $opt::plain) ? "--plain" : ""),
|
||||
((defined $opt::retries) ? "--retries ".$opt::retries : ""),
|
||||
((defined $opt::max_chars) ? "--max-chars ".$opt::max_chars : ""),
|
||||
((defined $opt::arg_sep) ? "--arg-sep ".$opt::arg_sep : ""),
|
||||
((defined $opt::arg_file_sep) ? "--arg-file-sep ".$opt::arg_file_sep : ""),
|
||||
((defined $opt::timeout) ? "--timeout ".$opt::timeout : ""),
|
||||
((defined $opt::ungroup) ? "-u" : ""),
|
||||
(@Global::transfer_files ? map { "--tf ".::shell_quote_scalar($_) }
|
||||
@Global::transfer_files : ""),
|
||||
(@Global::ret_files ? map { "--return ".::shell_quote_scalar($_) }
|
||||
@Global::ret_files : ""),
|
||||
(@opt::env ? map { "--env ".::shell_quote_scalar($_) } @opt::env : ""),
|
||||
(@opt::v ? "-vv" : ""),
|
||||
);
|
||||
::debug("init", "| $0 $options\n");
|
||||
open(my $parallel_fh, "|-", "$0 --will-cite -j0 $options") ||
|
||||
|
@ -3896,7 +3903,7 @@ sub which {
|
|||
# Can be formatted as:
|
||||
# [sh] -sh sh busybox sh -sh (sh)
|
||||
# /bin/sh /sbin/sh /opt/csw/sh
|
||||
# NOT: foo.sh sshd crash flush pdflush scosh fsflush ssh
|
||||
# But not: foo.sh sshd crash flush pdflush scosh fsflush ssh
|
||||
my $shell = "(?:".join("|",map { "\Q$_\E" } @shells).")";
|
||||
$regexp = '^((\[)('. $shell. ')(\])|(|\S+/|busybox )('. $shell. '))($| [^(])';
|
||||
%fakename = (
|
||||
|
@ -4075,7 +4082,9 @@ sub kill_youngster_if_not_enough_mem {
|
|||
for my $sshlogin (@sshlogins) {
|
||||
for my $job (sort { $b->seq() <=> $a->seq() } @{$jobs_of{$sshlogin}}) {
|
||||
if($sshlogin->memfree() < $opt::memfree * 0.5) {
|
||||
::debug("mem","\n",map { $_->seq()." " } (sort { $b->seq() <=> $a->seq() } @{$jobs_of{$sshlogin}}));
|
||||
::debug("mem","\n",map { $_->seq()." " }
|
||||
(sort { $b->seq() <=> $a->seq() }
|
||||
@{$jobs_of{$sshlogin}}));
|
||||
::debug("mem","\n", $job->seq(), "killed ",
|
||||
$sshlogin->memfree()," < ",$opt::memfree * 0.5);
|
||||
$job->kill();
|
||||
|
@ -4084,7 +4093,8 @@ sub kill_youngster_if_not_enough_mem {
|
|||
last;
|
||||
}
|
||||
}
|
||||
::debug("mem","Free mem OK ", $sshlogin->memfree()," > ",$opt::memfree * 0.5);
|
||||
::debug("mem","Free mem OK ",
|
||||
$sshlogin->memfree()," > ",$opt::memfree * 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ mkdir tmp
|
|||
cd tmp
|
||||
unset run_test
|
||||
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj5 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj300% -k --joblog /tmp/jl-`basename $0` -L1
|
||||
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
||||
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
||||
|
||||
echo '### Can csh propagate a variable containing \n';
|
||||
export A=$(seq 3); parallel -S csh@localhost --env A bash -c \''echo "$A"'\' ::: dummy
|
||||
export A=$(seq 3); parallel -S csh@lo --env A bash -c \''echo "$A"'\' ::: dummy
|
||||
|
||||
echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores'
|
||||
echo '** test_zsh'
|
||||
|
@ -55,63 +55,83 @@ echo '### test filename :'
|
|||
cat :.:; rm : :.:
|
||||
|
||||
echo '### Test --wd ... --cleanup which should remove the filled tmp dir'
|
||||
find ~/.parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm;
|
||||
stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S lo -v echo ">"{}.6 ::: uNiQuE_sTrInG;
|
||||
find ~/.parallel/tmp |grep uNiQuE_sTrInG.6
|
||||
ssh sh@lo 'mkdir -p .parallel/tmp; find .parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm';
|
||||
stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S sh@lo -v echo ">"{}.6 ::: uNiQuE_sTrInG;
|
||||
find ~sh/.parallel/tmp |grep uNiQuE_sTrInG.6
|
||||
|
||||
echo '### Test --wd --'
|
||||
stdout parallel --wd -- -S lo echo OK ">"{}.7 ::: uNiQuE_sTrInG;
|
||||
cat ~/--/uNiQuE_sTrInG.7;
|
||||
stdout rm ~/--/uNiQuE_sTrInG.7
|
||||
stdout parallel --wd -- -S sh@lo echo OK ">"{}.7 ::: uNiQuE_sTrInG;
|
||||
cat ~sh/--/uNiQuE_sTrInG.7;
|
||||
stdout ssh sh@lo rm ./--/uNiQuE_sTrInG.7
|
||||
|
||||
echo '### Test --wd " "'
|
||||
stdout parallel --wd " " -S lo echo OK ">"{}.8 ::: uNiQuE_sTrInG;
|
||||
cat ~/" "/uNiQuE_sTrInG.8;
|
||||
stdout rm ~/" "/uNiQuE_sTrInG.8
|
||||
stdout parallel --wd " " -S sh@lo echo OK ">"{}.8 ::: uNiQuE_sTrInG;
|
||||
cat ~sh/" "/uNiQuE_sTrInG.8;
|
||||
stdout ssh sh@lo rm ./'" "'/uNiQuE_sTrInG.8
|
||||
|
||||
echo "### Test --wd \"'\""
|
||||
stdout parallel --wd "'" -S lo echo OK ">"{}.9 ::: uNiQuE_sTrInG;
|
||||
cat ~/"'"/uNiQuE_sTrInG.9;
|
||||
stdout rm ~/"'"/uNiQuE_sTrInG.9
|
||||
stdout parallel --wd "'" -S sh@lo echo OK ">"{}.9 ::: uNiQuE_sTrInG;
|
||||
cat ~sh/"'"/uNiQuE_sTrInG.9;
|
||||
stdout ssh sh@lo rm ./"\\'"/uNiQuE_sTrInG.9
|
||||
|
||||
echo '### Test --trc ./--/--foo1'
|
||||
mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1;
|
||||
stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1;
|
||||
stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1;
|
||||
stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
|
||||
|
||||
echo '### Test --trc ./:dir/:foo2'
|
||||
mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2;
|
||||
stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1;
|
||||
stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2;
|
||||
cat ./:dir/:foo2.1;
|
||||
stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2;
|
||||
cat ./:dir/:foo2.2
|
||||
|
||||
echo '### Test --trc ./" "/" "foo3'
|
||||
mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3;
|
||||
stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1;
|
||||
stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3;
|
||||
cat ./" "/" "foo3.1;
|
||||
stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3;
|
||||
cat ./" "/" "foo3.2
|
||||
|
||||
echo '### Test --trc ./--/./--foo4'
|
||||
mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4;
|
||||
stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4;
|
||||
cat ./--/./--foo4.1
|
||||
|
||||
echo '### Test --trc ./:/./:foo5'
|
||||
mkdir -p ./:; echo 'Content :/./:foo5' > ./:/./:foo5;
|
||||
stdout parallel --trc {}.1 -S lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:/./:foo5; cat ./:/./:foo5.1
|
||||
mkdir -p ./:a; echo 'Content :a/./:foo5' > ./:a/./:foo5;
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:a/./:foo5;
|
||||
cat ./:a/./:foo5.1
|
||||
|
||||
echo '### Test --trc ./" "/./" "foo6'
|
||||
mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6;
|
||||
stdout parallel --trc {}.1 -S lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
|
||||
stdout parallel --trc {}.1 -S sh@lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6;
|
||||
cat ./" "/./" "foo6.1
|
||||
|
||||
echo '### Test --trc "-- " "-- "'
|
||||
touch -- '-- ' ' --'; rm -f ./?--.a ./--?.a;
|
||||
parallel --trc {}.a -S csh@lo,sh@lo touch ./{}.a ::: '-- ' ' --'; ls ./--?.a ./?--.a;
|
||||
parallel --nonall -k -S csh@lo,sh@lo 'ls ./?-- || echo OK';
|
||||
parallel --nonall -k -S csh@lo,sh@lo 'ls ./--? || echo OK';
|
||||
parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--.a || echo OK';
|
||||
parallel --nonall -k -S csh@lo,sh@lo 'ls ./--?.a || echo OK'
|
||||
|
||||
|
||||
echo '### bug #46519: --onall ignores --transfer'
|
||||
touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???;
|
||||
parallel --onall --tf bug46519.{} --trc bug46519.{}{} --trc bug46519.{}{}{} -S csh@lo,sh@lo
|
||||
'ls bug46519.{}; touch bug46519.{}{} bug46519.{}{}{}' ::: a b c;
|
||||
ls bug46519.?? bug46519.???;
|
||||
parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
|
||||
|
||||
|
||||
echo TODO
|
||||
|
||||
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|
||||
## echo missing
|
||||
## echo '### Test --trc "-- "'
|
||||
## echo missing
|
||||
## echo '### Test --trc " --"'
|
||||
## echo missing
|
||||
##
|
||||
|
||||
EOF
|
||||
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# /tmp/parallel-local-ssh2 will by default be owned by me and should be writable by *@localhost
|
||||
chmod 777 "$TMPDIR" 2>/dev/null
|
||||
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj5 --retries 3 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj300% --retries 3 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
echo "### bug #43518: GNU Parallel doesn't obey servers' jobs capacity when an ssh login file is reloaded"
|
||||
# Pre-20141106 Would reset the number of jobs run on all sshlogin if --slf changed
|
||||
# Thus must take at least 25 sec to run
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SSH only allowed to localhost/lo
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj2 --retries 3 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj100% --retries 3 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
echo '### --hostgroup force ncpu'
|
||||
parallel --delay 0.1 --hgrp -S @g1/1/parallel@lo -S @g2/3/lo whoami\;sleep 0.3{} ::: {1..8} | sort
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
|||
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
||||
parallel: Warning: Removed no-such.host.
|
||||
parallel: Error: There are no hosts left to run on.
|
||||
echo '### Can csh propagate a variable containing \n'; export A=$(seq 3); parallel -S csh@localhost --env A bash -c \''echo "$A"'\' ::: dummy
|
||||
echo '### Can csh propagate a variable containing \n'; export A=$(seq 3); parallel -S csh@lo --env A bash -c \''echo "$A"'\' ::: dummy
|
||||
### Can csh propagate a variable containing \n
|
||||
1
|
||||
2
|
||||
|
@ -76,62 +76,104 @@ remote-:.:
|
|||
content-of-:
|
||||
echo '### Test --wd ... --cleanup which should remove the filled tmp dir'
|
||||
### Test --wd ... --cleanup which should remove the filled tmp dir
|
||||
find ~/.parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm; stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S lo -v echo ">"{}.6 ::: uNiQuE_sTrInG; find ~/.parallel/tmp |grep uNiQuE_sTrInG.6
|
||||
ssh sh@lo 'mkdir -p .parallel/tmp; find .parallel/tmp |grep uNiQuE_sTrInG.6 | parallel rm'; stdout parallel -j9 -k --retries 3 --wd ... --cleanup -S sh@lo -v echo ">"{}.6 ::: uNiQuE_sTrInG; find ~sh/.parallel/tmp |grep uNiQuE_sTrInG.6
|
||||
echo >uNiQuE_sTrInG.6
|
||||
echo '### Test --wd --'
|
||||
### Test --wd --
|
||||
stdout parallel --wd -- -S lo echo OK ">"{}.7 ::: uNiQuE_sTrInG; cat ~/--/uNiQuE_sTrInG.7; stdout rm ~/--/uNiQuE_sTrInG.7
|
||||
stdout parallel --wd -- -S sh@lo echo OK ">"{}.7 ::: uNiQuE_sTrInG; cat ~sh/--/uNiQuE_sTrInG.7; stdout ssh sh@lo rm ./--/uNiQuE_sTrInG.7
|
||||
OK
|
||||
echo '### Test --wd " "'
|
||||
### Test --wd " "
|
||||
stdout parallel --wd " " -S lo echo OK ">"{}.8 ::: uNiQuE_sTrInG; cat ~/" "/uNiQuE_sTrInG.8; stdout rm ~/" "/uNiQuE_sTrInG.8
|
||||
stdout parallel --wd " " -S sh@lo echo OK ">"{}.8 ::: uNiQuE_sTrInG; cat ~sh/" "/uNiQuE_sTrInG.8; stdout ssh sh@lo rm ./'" "'/uNiQuE_sTrInG.8
|
||||
OK
|
||||
echo "### Test --wd \"'\""
|
||||
### Test --wd "'"
|
||||
stdout parallel --wd "'" -S lo echo OK ">"{}.9 ::: uNiQuE_sTrInG; cat ~/"'"/uNiQuE_sTrInG.9; stdout rm ~/"'"/uNiQuE_sTrInG.9
|
||||
stdout parallel --wd "'" -S sh@lo echo OK ">"{}.9 ::: uNiQuE_sTrInG; cat ~sh/"'"/uNiQuE_sTrInG.9; stdout ssh sh@lo rm ./"\\'"/uNiQuE_sTrInG.9
|
||||
OK
|
||||
echo '### Test --trc ./--/--foo1'
|
||||
### Test --trc ./--/--foo1
|
||||
mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1; stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
|
||||
mkdir -p ./--; echo 'Content --/--foo1' > ./--/--foo1; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./--/--foo1; cat ./--/--foo1.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: --/--foo1; cat ./--/--foo1.2
|
||||
Content --/--foo1
|
||||
remote1
|
||||
Content --/--foo1
|
||||
remote2
|
||||
echo '### Test --trc ./:dir/:foo2'
|
||||
### Test --trc ./:dir/:foo2
|
||||
mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1; stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
|
||||
mkdir -p ./:dir; echo 'Content :dir/:foo2' > ./:dir/:foo2; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./:dir/:foo2; cat ./:dir/:foo2.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: :dir/:foo2; cat ./:dir/:foo2.2
|
||||
Content :dir/:foo2
|
||||
remote1
|
||||
Content :dir/:foo2
|
||||
remote2
|
||||
echo '### Test --trc ./" "/" "foo3'
|
||||
### Test --trc ./" "/" "foo3
|
||||
mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3; stdout parallel --trc {}.1 -S lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1; stdout parallel --trc {}.2 -S lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
|
||||
mkdir -p ./" "; echo 'Content _/_foo3' > ./" "/" "foo3; stdout parallel --trc {}.1 -S sh@lo '(cat {}; echo remote1) > {}.1' ::: ./" "/" "foo3; cat ./" "/" "foo3.1; stdout parallel --trc {}.2 -S sh@lo '(cat ./{}; echo remote2) > {}.2' ::: " "/" "foo3; cat ./" "/" "foo3.2
|
||||
Content _/_foo3
|
||||
remote1
|
||||
Content _/_foo3
|
||||
remote2
|
||||
echo '### Test --trc ./--/./--foo4'
|
||||
### Test --trc ./--/./--foo4
|
||||
mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; stdout parallel --trc {}.1 -S lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
|
||||
mkdir -p ./--; echo 'Content --/./--foo4' > ./--/./--foo4; stdout parallel --trc {}.1 -S sh@lo '(cat ./--foo4; echo remote{}) > --foo4.1' ::: --/./--foo4; cat ./--/./--foo4.1
|
||||
Content --/./--foo4
|
||||
remote--/./--foo4
|
||||
echo '### Test --trc ./:/./:foo5'
|
||||
### Test --trc ./:/./:foo5
|
||||
mkdir -p ./:; echo 'Content :/./:foo5' > ./:/./:foo5; stdout parallel --trc {}.1 -S lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:/./:foo5; cat ./:/./:foo5.1
|
||||
Content :/./:foo5
|
||||
remote./:/./:foo5
|
||||
mkdir -p ./:a; echo 'Content :a/./:foo5' > ./:a/./:foo5; stdout parallel --trc {}.1 -S sh@lo '(cat ./:foo5; echo remote{}) > ./:foo5.1' ::: ./:a/./:foo5; cat ./:a/./:foo5.1
|
||||
Content :a/./:foo5
|
||||
remote./:a/./:foo5
|
||||
echo '### Test --trc ./" "/./" "foo6'
|
||||
### Test --trc ./" "/./" "foo6
|
||||
mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6; stdout parallel --trc {}.1 -S lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
|
||||
mkdir -p ./" "; echo 'Content _/./_foo6' > ./" "/./" "foo6; stdout parallel --trc {}.1 -S sh@lo '(cat ./" "foo6; echo remote{}) > ./" "foo6.1' ::: ./" "/./" "foo6; cat ./" "/./" "foo6.1
|
||||
Content _/./_foo6
|
||||
remote./ /./ foo6
|
||||
echo '### Test --trc "-- " "-- "'
|
||||
### Test --trc "-- " "-- "
|
||||
touch -- '-- ' ' --'; rm -f ./?--.a ./--?.a; parallel --trc {}.a -S csh@lo,sh@lo touch ./{}.a ::: '-- ' ' --'; ls ./--?.a ./?--.a; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?-- || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./--? || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./?--.a || echo OK'; parallel --nonall -k -S csh@lo,sh@lo 'ls ./--?.a || echo OK'
|
||||
./ --.a
|
||||
./-- .a
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
ls: No match.
|
||||
ls: cannot access ./?--: No such file or directory
|
||||
ls: No match.
|
||||
ls: cannot access ./--?: No such file or directory
|
||||
ls: No match.
|
||||
ls: cannot access ./?--.a: No such file or directory
|
||||
ls: No match.
|
||||
ls: cannot access ./--?.a: No such file or directory
|
||||
echo '### bug #46519: --onall ignores --transfer'
|
||||
### bug #46519: --onall ignores --transfer
|
||||
touch bug46519.{a,b,c}; rm -f bug46519.?? bug46519.???; parallel --onall --tf bug46519.{} --trc bug46519.{}{} --trc bug46519.{}{}{} -S csh@lo,sh@lo 'ls bug46519.{}; touch bug46519.{}{} bug46519.{}{}{}' ::: a b c; ls bug46519.?? bug46519.???; parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
|
||||
bug46519.a
|
||||
bug46519.b
|
||||
bug46519.c
|
||||
bug46519.a
|
||||
bug46519.b
|
||||
bug46519.c
|
||||
bug46519.aa
|
||||
bug46519.aaa
|
||||
bug46519.bb
|
||||
bug46519.bbb
|
||||
bug46519.cc
|
||||
bug46519.ccc
|
||||
ls: cannot access bug46519.aa: No such file or directory
|
||||
ls: cannot access bug46519.aaa: No such file or directory
|
||||
ls: cannot access bug46519.bb: No such file or directory
|
||||
ls: cannot access bug46519.bbb: No such file or directory
|
||||
ls: cannot access bug46519.cc: No such file or directory
|
||||
ls: cannot access bug46519.ccc: No such file or directory
|
||||
ls: cannot access bug46519.aa: No such file or directory
|
||||
ls: cannot access bug46519.aaa: No such file or directory
|
||||
ls: cannot access bug46519.bb: No such file or directory
|
||||
ls: cannot access bug46519.bbb: No such file or directory
|
||||
ls: cannot access bug46519.cc: No such file or directory
|
||||
ls: cannot access bug46519.ccc: No such file or directory
|
||||
echo TODO
|
||||
TODO
|
||||
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|
||||
## echo missing
|
||||
## echo '### Test --trc "-- "'
|
||||
## echo missing
|
||||
## echo '### Test --trc " --"'
|
||||
## echo missing
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue