mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 16:07:54 +00:00
Fixed bug #43284: {%} and {#} with --xapply.
This commit is contained in:
parent
9270b1284b
commit
dee7e98321
|
@ -735,8 +735,8 @@ sub parse_options {
|
||||||
%Global::replace =
|
%Global::replace =
|
||||||
(
|
(
|
||||||
'{}' => '',
|
'{}' => '',
|
||||||
'{#}' => '$_=$job->seq()',
|
'{#}' => '1 $_=$job->seq()',
|
||||||
'{%}' => '$_=$job->slot()',
|
'{%}' => '1 $_=$job->slot()',
|
||||||
'{/}' => 's:.*/::',
|
'{/}' => 's:.*/::',
|
||||||
'{//}' => '$Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);',
|
'{//}' => '$Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);',
|
||||||
'{/.}' => 's:.*/::; s:\.[^/.]+$::;',
|
'{/.}' => 's:.*/::; s:\.[^/.]+$::;',
|
||||||
|
|
|
@ -1375,8 +1375,8 @@ it possible to define your own replacement strings. GNU B<parallel>'s
|
||||||
7 replacement strings are implemented as:
|
7 replacement strings are implemented as:
|
||||||
|
|
||||||
--rpl '{} '
|
--rpl '{} '
|
||||||
--rpl '{#} $_=$job->seq()'
|
--rpl '{#} 1 $_=$job->seq()'
|
||||||
--rpl '{%} $_=$job->slot()'
|
--rpl '{%} 1 $_=$job->slot()'
|
||||||
--rpl '{/} s:.*/::'
|
--rpl '{/} s:.*/::'
|
||||||
--rpl '{//} $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);'
|
--rpl '{//} $Global::use{"File::Basename"} ||= eval "use File::Basename; 1;"; $_ = dirname($_);'
|
||||||
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
|
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "PARALLEL_TUTORIAL 1"
|
.IX Title "PARALLEL_TUTORIAL 1"
|
||||||
.TH PARALLEL_TUTORIAL 1 "2014-09-04" "20140827" "parallel"
|
.TH PARALLEL_TUTORIAL 1 "2014-09-23" "20140922" "parallel"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
|
|
|
@ -16,4 +16,10 @@ echo '### Test exit val - false';
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
|
echo '### Test bug #43284: {%} and {#} with --xapply';
|
||||||
|
parallel --xapply 'echo {1} {#} {%} {2}' ::: a ::: b;
|
||||||
|
parallel -N2 'echo {%}' ::: a b
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -8,3 +8,9 @@ echo '### Test exit val - false'; echo false | parallel; echo $?
|
||||||
1
|
1
|
||||||
echo '**'
|
echo '**'
|
||||||
**
|
**
|
||||||
|
echo '### Test bug #43284: {%} and {#} with --xapply'; parallel --xapply 'echo {1} {#} {%} {2}' ::: a ::: b; parallel -N2 'echo {%}' ::: a b
|
||||||
|
### Test bug #43284: {%} and {#} with --xapply
|
||||||
|
a 1 1 b
|
||||||
|
1
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
|
Loading…
Reference in a new issue