parallel: --latestline chops line length to terminal width.

This commit is contained in:
Ole Tange 2022-10-15 21:09:51 +02:00
parent 5ef995babb
commit ba0f1d38d6
12 changed files with 346 additions and 247 deletions

View file

@ -11196,12 +11196,22 @@ sub print_files($) {
my $str = shift; my $str = shift;
my $seq = $self->seq(); my $seq = $self->seq();
my ($color,$reset_color) = $self->color(); my ($color,$reset_color) = $self->color();
my $tag = $self->tag();
my $untabify_tag = $self->untabtag();
my $untabify_str = $str;
$untabify_str =~ s/\t/" "x(8-($-[0]%8))/eg;
my $termcol = ::terminal_columns();
my $taglen = $termcol;
my $strlen = $termcol-(length $untabify_tag)-(length $untabify_str);
$untabify_str = substr($untabify_str,0,$strlen);
$untabify_tag = substr($untabify_tag,0,$taglen);
$maxseq = $seq > $maxseq ? $seq : $maxseq; $maxseq = $seq > $maxseq ? $seq : $maxseq;
print($out_fh print($out_fh
"$up"x($curseq - $seq), "$up"x($curseq - $seq),
"\n"x($seq - $curseq), "\n"x($seq - $curseq),
"\r", $self->tag(), "\r", $untabify_tag,
$color,$str,$reset_color, $color, $untabify_str, $reset_color,
"\n"x($maxseq-$seq+1)); "\n"x($maxseq-$seq+1));
$curseq = $maxseq + 1; $curseq = $maxseq + 1;
} }
@ -11604,6 +11614,16 @@ sub tag($) {
return $self->{'tag'}; return $self->{'tag'};
} }
sub untabtag($) {
# tag with \t replaced with spaces
my $self = shift;
if(not defined $self->{'untab'}{$self->{'tag'}}) {
$self->{'untab'}{$self->{'tag'}} = $self->{'tag'};
$self->{'untab'}{$self->{'tag'}} =~ s/\t/" "x(8-($-[0]%8))/eg;
}
return $self->{'untab'}{$self->{'tag'}};
}
{ {
my (@color,$eol,$reset_color,$init); my (@color,$eol,$reset_color,$init);

View file

@ -402,23 +402,6 @@ sub die_bug($) {
exit(255); exit(255);
} }
sub version() {
# Returns: N/A
print join
("\n",
"GNU $Global::progname $Global::version",
"Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software",
"Foundation, Inc.",
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>",
"This is free software: you are free to change and redistribute it.",
"GNU $Global::progname comes with no warranty.",
"",
"Web site: https://www.gnu.org/software/${Global::progname}\n",
"When using programs that use GNU Parallel to process data for publication",
"please cite as described in 'parallel --citation'.\n",
);
}
if(@ARGV) { if(@ARGV) {
sort_files(@ARGV); sort_files(@ARGV);
} elsif(length $opt::files0_from) { } elsif(length $opt::files0_from) {

View file

@ -79,20 +79,21 @@ REQUIRE=bash -c '\
}; \ }; \
export -f is_installed; \ export -f is_installed; \
parallel -n2 --tag is_installed ::: \ parallel -n2 --tag is_installed ::: \
script "echo | script -c echo -q /dev/null" \ script "echo | script -c echo -q /dev/null" \
"ssh sh@lo" "timeout 20 ssh sh@lo true" \ "ssh sh@lo" "timeout 20 ssh sh@lo true" \
"ssh csh@lo" "timeout 5 ssh csh@lo true" \ "ssh csh@lo" "timeout 5 ssh csh@lo true" \
niceload "niceload echo niceload is installed" \ niceload "niceload echo niceload is installed" \
expect "expect -c \"spawn cat; puts \\\"expect is installed\\\"\"" \ expect "expect -c \"spawn cat; puts \\\"expect is installed\\\"\"" \
autossh "autossh -V" \ autossh "autossh -V" \
tcsh "tcsh -c echo tcsh installed" \ tcsh "tcsh -c echo tcsh installed" \
seq "seq 1 2" \ seq "seq 1 2" \
stdout "stdout echo stdout is installed" \ stdout "stdout echo stdout is installed" \
convert "convert -version" \ convert "convert -version" \
bc "echo 1+2 | bc" \ bc "echo 1+2 | bc" \
gawk "echo | gawk \"{print \\\"gawk is installed\\\"}\"" \ gawk "echo | gawk \"{print \\\"gawk is installed\\\"}\"" \
pv "echo | pv -qL 10" \ pv "echo | pv -qL 10" \
timeout "timeout 1 echo timeout is installed" \ timeout "timeout 1 echo timeout is installed" \
sshpass "sshpass echo sshpass is installed" \
' '
# lsh "lsh lo echo lsh is installed" \ # lsh "lsh lo echo lsh is installed" \

View file

@ -98,7 +98,7 @@ par_tmpl1() {
# x with 2 decimals # x with 2 decimals
DecimalX: {=x $_=sprintf("%.2f",$_) =} DecimalX: {=x $_=sprintf("%.2f",$_) =}
TenX: {=x $_=$_*10 =} TenX: {=x $_=$_*10 =}
RandomVal: {=1 $_=rand() =} RandomVal: {=1 $_=0.1+0.9*rand() =}
EOF EOF
@ -291,7 +291,7 @@ par_tagstring_with_d() {
echo 'bug #47002: --tagstring with -d \n\n' echo 'bug #47002: --tagstring with -d \n\n'
(seq 3; echo; seq 4) | (seq 3; echo; seq 4) |
parallel -k -d '\n\n' --tagstring {%} echo ABC';'echo parallel -k -d '\n\n' --tagstring {#} echo ABC';'echo
} }
par_xargs_nul_char_in_input() { par_xargs_nul_char_in_input() {

View file

@ -8,6 +8,18 @@
# 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_ll_long_line() {
echo '### --latest-line with lines longer than terminal width'
COLUMNS=30 parallel --delay 0.3 --tagstring '{=$_.="x"x$_=}' \
--ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30}
}
par_ll_color_long_line() {
echo '### --latest-line --color with lines longer than terminal width'
COLUMNS=30 parallel --delay 0.3 --color --tagstring '{=$_.="x"x$_=}' \
--ll 'echo {}00000 | sed -e "s/$/' {1..100} /'"' ::: {1..30}
}
par_reload_slf_every_second() { par_reload_slf_every_second() {
echo "### --slf should reload every second" echo "### --slf should reload every second"
tmp=$(mktemp) tmp=$(mktemp)

View file

@ -328,7 +328,9 @@ par_tee_too_many_args() {
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`
seq 11 | parallel -k --tag --pipe -j0 --tee grep {} ::: {1..10000} 2> "$tmp" seq 11 | parallel -k --tag --pipe -j0 --tee grep {} ::: {1..10000} 2> "$tmp"
cat "$tmp" | perl -pe 's/\d+/999/g' cat "$tmp" | perl -pe 's/\d+/999/g' |
grep -v 'Warning: Starting' |
grep -v 'Warning: Consider'
rm "$tmp" rm "$tmp"
} }

View file

@ -8,52 +8,72 @@ SERVER1=parallel-server1
SERVER2=parallel-server2 SERVER2=parallel-server2
SSHUSER1=vagrant SSHUSER1=vagrant
SSHUSER2=vagrant SSHUSER2=vagrant
SSHLOGIN1=$SSHUSER1@$SERVER1 export SSHLOGIN1=$SSHUSER1@$SERVER1
SSHLOGIN2=$SSHUSER2@$SERVER2 export SSHLOGIN2=$SSHUSER2@$SERVER2
#SERVER1=parallel-server1 par_onall() {
#SERVER2=parallel-server2 echo '### Test --onall'
#SSHLOGIN1=parallel@$SERVER1 parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2
#SSHLOGIN2=parallel@$SERVER2 }
# -L1 will join lines ending in ' ' par_pipe_onall() {
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/\;s/\$SSHLOGIN1/$SSHLOGIN1/\;s/\$SSHLOGIN2/$SSHLOGIN2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1 -r echo '### Test | --onall'
echo '### Test --onall'; seq 3 | parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: -
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 }
echo '### Test | --onall'; par_onall_u() {
seq 3 | parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: - echo '### Test --onall -u'
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 -u '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort
}
echo '### Test --onall -u'; par_nonall() {
parallel --onall -S $SSHLOGIN1,$SSHLOGIN2 -u '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort echo '### Test --nonall'
parallel --nonall -k -S $SSHLOGIN1,$SSHLOGIN2 'hostname' | sort
}
echo '### Test --nonall'; par_nonall_u() {
parallel --nonall -k -S $SSHLOGIN1,$SSHLOGIN2 'hostname' | sort echo '### Test --nonall -u - should be interleaved x y x y'
parallel --nonall --sshdelay 2 -S $SSHLOGIN1,$SSHLOGIN2 -u \
'hostname|grep -q centos && sleep 2; hostname;sleep 4;hostname;' |
uniq -c | sort
}
echo '### Test --nonall -u - should be interleaved x y x y'; par_nonall_sshloginfile_stdin() {
parallel --nonall --sshdelay 2 -S $SSHLOGIN1,$SSHLOGIN2 -u 'hostname|grep -q centos && sleep 2; hostname;sleep 4;hostname;' echo '### Test read sshloginfile from STDIN'
echo $SSHLOGIN1 | parallel -S - --nonall hostname;
echo $SSHLOGIN1 | parallel --sshloginfile - --nonall hostname
}
echo '### Test read sshloginfile from STDIN'; par_nonall_basefile() {
echo $SSHLOGIN1 | parallel -S - --nonall hostname; echo '### Test --nonall --basefile'
echo $SSHLOGIN1 | parallel --sshloginfile - --nonall hostname touch /tmp/nonall--basefile
parallel --nonall --basefile /tmp/nonall--basefile -S $SSHLOGIN1,$SSHLOGIN2 ls /tmp/nonall--basefile\; rm /tmp/nonall--basefile
rm /tmp/nonall--basefile
}
echo '### Test --nonall --basefile'; par_onall_basefile() {
touch /tmp/nonall--basefile; echo '### Test --onall --basefile'
parallel --nonall --basefile /tmp/nonall--basefile -S $SSHLOGIN1,$SSHLOGIN2 ls /tmp/nonall--basefile\; rm /tmp/nonall--basefile; touch /tmp/onall--basefile
rm /tmp/nonall--basefile parallel --onall --basefile /tmp/onall--basefile -S $SSHLOGIN1,$SSHLOGIN2 ls {}\; rm {} ::: /tmp/onall--basefile
rm /tmp/onall--basefile
}
echo '### Test --onall --basefile'; par_workdir() {
touch /tmp/onall--basefile; echo '### Test --workdir .'
parallel --onall --basefile /tmp/onall--basefile -S $SSHLOGIN1,$SSHLOGIN2 ls {}\; rm {} ::: /tmp/onall--basefile; ssh $SSHLOGIN1 mkdir -p mydir
rm /tmp/onall--basefile mkdir -p $HOME/mydir; cd $HOME/mydir
parallel --workdir . -S $SSHLOGIN1 ::: pwd
}
echo '### Test --workdir .'; par_wd() {
ssh $SSHLOGIN1 mkdir -p mydir; echo '### Test --wd .'
mkdir -p $HOME/mydir; cd $HOME/mydir; ssh $SSHLOGIN2 mkdir -p mydir
parallel --workdir . -S $SSHLOGIN1 ::: pwd mkdir -p $HOME/mydir; cd $HOME/mydir
parallel --workdir . -S $SSHLOGIN2 ::: pwd
}
echo '### Test --wd .'; export -f $(compgen -A function | grep par_)
ssh $SSHLOGIN2 mkdir -p mydir; #compgen -A function | grep par_ | sort | parallel --delay $D -j$P --tag -k '{} 2>&1'
mkdir -p $HOME/mydir; cd $HOME/mydir; compgen -A function | grep par_ | sort |
parallel --workdir . -S $SSHLOGIN2 ::: pwd parallel --joblog /tmp/jl-`basename $0` --retries 3 -j300% --tag -k '{} 2>&1' |
EOF perl -pe "s//'/g;s//'/g"

View file

@ -497,6 +497,68 @@ par_kill_children_timeout 0 0 0
par_line_buffer ### --line-buffer par_line_buffer ### --line-buffer
par_line_buffer 55 55 120 par_line_buffer 55 55 120
par_line_buffer These must diff: 1 par_line_buffer These must diff: 1
par_ll_color_long_line ### --latest-line --color with lines longer than terminal width
par_ll_color_long_line par_ll_color_long_line 1x 100000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 2xx 200000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 3xxx 300000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 4xxxx 400000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 5xxxxx 500000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 6xxxxxx 600000 1 2 3 4 5 6 7 8(B
par_ll_color_long_line par_ll_color_long_line 7xxxxxxx 700000 1 2 3 4(B
par_ll_color_long_line par_ll_color_long_line 8xxxxxxxx 800000 1 2 3 4(B
par_ll_color_long_line par_ll_color_long_line 9xxxxxxxxx 900000 1 2 3 4(B
par_ll_color_long_line par_ll_color_long_line 10xxxxxxxxxx 1000000 1 2 3 (B
par_ll_color_long_line par_ll_color_long_line 11xxxxxxxxxxx 1100000 1 2 3 (B
par_ll_color_long_line par_ll_color_long_line 12xxxxxxxxxxxx 1200000 1 2 3 (B
par_ll_color_long_line par_ll_color_long_line 13xxxxxxxxxxxxx 1300000 1 2 3 (B
par_ll_color_long_line par_ll_color_long_line 14xxxxxxxxxxxxxx 140000(B
par_ll_color_long_line par_ll_color_long_line 15xxxxxxxxxxxxxxx 150000(B
par_ll_color_long_line par_ll_color_long_line 16xxxxxxxxxxxxxxxx 160000(B
par_ll_color_long_line par_ll_color_long_line 17xxxxxxxxxxxxxxxxx 170000(B
par_ll_color_long_line par_ll_color_long_line 18xxxxxxxxxxxxxxxxxx 180000(B
par_ll_color_long_line par_ll_color_long_line 19xxxxxxxxxxxxxxxxxxx 190000(B
par_ll_color_long_line par_ll_color_long_line 20xxxxxxxxxxxxxxxxxxxx 200000(B
par_ll_color_long_line par_ll_color_long_line 21xxxxxxxxxxxxxxxxxxxxx 210000(B
par_ll_color_long_line par_ll_color_long_line 22xxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 23xxxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 24xxxxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 25xxxxxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 26xxxxxxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 27xxxxxxxxxxxxxxxxxxxxxxxxxxx (B
par_ll_color_long_line par_ll_color_long_line 28xxxxxxxxxxxxxxxxxxxxxxxxxxxx(B
par_ll_color_long_line par_ll_color_long_line 29xxxxxxxxxxxxxxxxxxxxxxxxxxxx(B
par_ll_color_long_line par_ll_color_long_line 30xxxxxxxxxxxxxxxxxxxxxxxxxxxx(B
par_ll_long_line ### --latest-line with lines longer than terminal width
par_ll_long_line par_ll_long_line 1x 100000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 2xx 200000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 3xxx 300000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 4xxxx 400000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 5xxxxx 500000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 6xxxxxx 600000 1 2 3 4 5 6 7 8
par_ll_long_line par_ll_long_line 7xxxxxxx 700000 1 2 3 4
par_ll_long_line par_ll_long_line 8xxxxxxxx 800000 1 2 3 4
par_ll_long_line par_ll_long_line 9xxxxxxxxx 900000 1 2 3 4
par_ll_long_line par_ll_long_line 10xxxxxxxxxx 1000000 1 2 3
par_ll_long_line par_ll_long_line 11xxxxxxxxxxx 1100000 1 2 3
par_ll_long_line par_ll_long_line 12xxxxxxxxxxxx 1200000 1 2 3
par_ll_long_line par_ll_long_line 13xxxxxxxxxxxxx 1300000 1 2 3
par_ll_long_line par_ll_long_line 14xxxxxxxxxxxxxx 140000
par_ll_long_line par_ll_long_line 15xxxxxxxxxxxxxxx 150000
par_ll_long_line par_ll_long_line 16xxxxxxxxxxxxxxxx 160000
par_ll_long_line par_ll_long_line 17xxxxxxxxxxxxxxxxx 170000
par_ll_long_line par_ll_long_line 18xxxxxxxxxxxxxxxxxx 180000
par_ll_long_line par_ll_long_line 19xxxxxxxxxxxxxxxxxxx 190000
par_ll_long_line par_ll_long_line 20xxxxxxxxxxxxxxxxxxxx 200000
par_ll_long_line par_ll_long_line 21xxxxxxxxxxxxxxxxxxxxx 210000
par_ll_long_line par_ll_long_line 22xxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 23xxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 24xxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 25xxxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 26xxxxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 27xxxxxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 28xxxxxxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 29xxxxxxxxxxxxxxxxxxxxxxxxxxxx
par_ll_long_line par_ll_long_line 30xxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 -

View file

@ -120,7 +120,7 @@ par_kill_hup parallel: bash -c 'sleep 3 & pid=$!; wait $pid'
par_kill_hup bash---pstree par_kill_hup bash---pstree
par_ll_lb_color bug #62386: --color (--ctag but without --tag) par_ll_lb_color bug #62386: --color (--ctag but without --tag)
par_ll_lb_color bug #62438: See last line from multiple jobslots par_ll_lb_color bug #62438: See last line from multiple jobslots
par_ll_lb_color 90c6a891f3cd706c82a76c9747de176c - par_ll_lb_color 29fcbb4944fef7ba0cd0fa8358dba815 -
par_more_than_9_relative_sshlogin ### Check more than 9(relative) simultaneous sshlogins par_more_than_9_relative_sshlogin ### Check more than 9(relative) simultaneous sshlogins
par_more_than_9_relative_sshlogin 1 par_more_than_9_relative_sshlogin 1
par_more_than_9_relative_sshlogin 2 par_more_than_9_relative_sshlogin 2

View file

@ -1,102 +1,111 @@
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 91XXX
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 91XXX
par_big_func 1 3XXX 91XXX par_big_func 1 3XXX 91XXX
par_big_func 1 1XXX 45XXX par_big_func 1 1XXX 46XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 19XXX par_big_func_name 18XXX
par_big_func_name 3XXX par_big_func_name 7XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 19XXX par_big_var_func_name 18XXX
par_big_var_func_name 9XXX par_big_var_func_name 18XXX
par_big_var_func_name 1XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 3XXX 6XXX par_many_args 1 3XXX 6XXX
par_many_args 1 1XXX 2XXX par_many_args 1 1XXX 3XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 224 5XXX par_many_func 1 200 4XXX
par_many_func 1 172 4XXX par_many_func 1 200 4XXX
par_many_var 1 976 23XXX par_many_func 1 200 4XXX
par_many_var 1 976 23XXX par_many_func 1 200 4XXX
par_many_var 1 976 23XXX par_many_func 1 200 4XXX
par_many_var 1 976 23XXX par_many_func 1 68 1XXX
par_many_var 1 976 23XXX par_many_var 1 948 22XXX
par_many_var 1 976 23XXX par_many_var 1 948 22XXX
par_many_var 1 812 19XXX par_many_var 1 948 22XXX
par_many_var_big_func 6XXX par_many_var 1 948 22XXX
par_many_var_big_func 6XXX par_many_var 1 948 22XXX
par_many_var_big_func 6XXX par_many_var 1 948 22XXX
par_many_var_big_func 6XXX par_many_var 1 948 22XXX
par_many_var_big_func 6XXX par_many_var 1 32 740
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 6XXX par_many_var_big_func 5XXX
par_many_var_big_func 260 par_many_var_big_func 5XXX
par_many_var_func 1 2XXX 59XXX par_many_var_big_func 5XXX
par_many_var_func 1 2XXX 59XXX par_many_var_big_func 5XXX
par_many_var_func 1 1XXX 41XXX par_many_var_big_func 5XXX
par_many_var_big_func 5XXX
par_many_var_big_func 5XXX
par_many_var_big_func 5XXX
par_many_var_big_func 5XXX
par_many_var_big_func 1XXX
par_many_var_func 1 2XXX 58XXX
par_many_var_func 1 2XXX 58XXX
par_many_var_func 1 1XXX 42XXX

View file

@ -1330,4 +1330,4 @@ mentioned in the release notes of next version of GNU Parallel.
echo A echo A
echo B echo B
echo C echo C
7 9

View file

@ -1,82 +1,72 @@
echo '### Test --onall'; parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 par_nonall ### Test --nonall
### Test --onall par_nonall centos8.localdomain
1 par_nonall freebsd11.localdomain
2 par_nonall_basefile ### Test --nonall --basefile
1 par_nonall_basefile /tmp/nonall--basefile
2 par_nonall_basefile /tmp/nonall--basefile
1 par_nonall_sshloginfile_stdin ### Test read sshloginfile from STDIN
2 par_nonall_sshloginfile_stdin centos8.localdomain
1 par_nonall_sshloginfile_stdin centos8.localdomain
2 par_nonall_u ### Test --nonall -u - should be interleaved x y x y
1 par_nonall_u 1 centos8.localdomain
2 par_nonall_u 1 centos8.localdomain
1 par_nonall_u 1 freebsd11.localdomain
2 par_nonall_u 1 freebsd11.localdomain
echo '### Test | --onall'; seq 3 | parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c :::: - par_onall ### Test --onall
### Test | --onall par_onall 1
1 par_onall 2
2 par_onall 1
3 par_onall 2
1 par_onall 1
2 par_onall 2
3 par_onall 1
1 par_onall 2
2 par_onall 1
3 par_onall 2
1 par_onall 1
2 par_onall 2
3 par_onall_basefile ### Test --onall --basefile
1 par_onall_basefile /tmp/onall--basefile
2 par_onall_basefile /tmp/onall--basefile
3 par_onall_u ### Test --onall -u
1 par_onall_u 1
2 par_onall_u 1
3 par_onall_u 1
echo '### Test --onall -u'; parallel --onall -S vagrant@parallel-server1,vagrant@parallel-server2 -u '(echo {1} {2}) | awk \{print\ \$2}' ::: a b c ::: 1 2 3 | sort par_onall_u 1
### Test --onall -u par_onall_u 1
1 par_onall_u 1
1 par_onall_u 2
1 par_onall_u 2
1 par_onall_u 2
1 par_onall_u 2
1 par_onall_u 2
2 par_onall_u 2
2 par_onall_u 3
2 par_onall_u 3
2 par_onall_u 3
2 par_onall_u 3
2 par_onall_u 3
3 par_onall_u 3
3 par_pipe_onall ### Test | --onall
3 par_pipe_onall 1
3 par_pipe_onall 2
3 par_pipe_onall 3
3 par_pipe_onall 1
echo '### Test --nonall'; parallel --nonall -k -S vagrant@parallel-server1,vagrant@parallel-server2 'hostname' | sort par_pipe_onall 2
### Test --nonall par_pipe_onall 3
centos8.localdomain par_pipe_onall 1
freebsd11.localdomain par_pipe_onall 2
echo '### Test --nonall -u - should be interleaved x y x y'; parallel --nonall --sshdelay 2 -S vagrant@parallel-server1,vagrant@parallel-server2 -u 'hostname|grep -q centos && sleep 2; hostname;sleep 4;hostname;' par_pipe_onall 3
### Test --nonall -u - should be interleaved x y x y par_pipe_onall 1
freebsd11.localdomain par_pipe_onall 2
centos8.localdomain par_pipe_onall 3
freebsd11.localdomain par_pipe_onall 1
centos8.localdomain par_pipe_onall 2
echo '### Test read sshloginfile from STDIN'; echo vagrant@parallel-server1 | parallel -S - --nonall hostname; echo vagrant@parallel-server1 | parallel --sshloginfile - --nonall hostname par_pipe_onall 3
### Test read sshloginfile from STDIN par_pipe_onall 1
centos8.localdomain par_pipe_onall 2
centos8.localdomain par_pipe_onall 3
echo '### Test --nonall --basefile'; touch /tmp/nonall--basefile; parallel --nonall --basefile /tmp/nonall--basefile -S vagrant@parallel-server1,vagrant@parallel-server2 ls /tmp/nonall--basefile\; rm /tmp/nonall--basefile; rm /tmp/nonall--basefile par_wd ### Test --wd .
### Test --nonall --basefile par_wd /usr/home/vagrant/mydir
/tmp/nonall--basefile par_workdir ### Test --workdir .
/tmp/nonall--basefile par_workdir /home/vagrant/mydir
echo '### Test --onall --basefile'; touch /tmp/onall--basefile; parallel --onall --basefile /tmp/onall--basefile -S vagrant@parallel-server1,vagrant@parallel-server2 ls {}\; rm {} ::: /tmp/onall--basefile; rm /tmp/onall--basefile
### Test --onall --basefile
/tmp/onall--basefile
/tmp/onall--basefile
echo '### Test --workdir .'; ssh vagrant@parallel-server1 mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S vagrant@parallel-server1 ::: pwd
### Test --workdir .
/home/vagrant/mydir
echo '### Test --wd .'; ssh vagrant@parallel-server2 mkdir -p mydir; mkdir -p $HOME/mydir; cd $HOME/mydir; parallel --workdir . -S vagrant@parallel-server2 ::: pwd
### Test --wd .
/usr/home/vagrant/mydir