mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
parallel: --tagstring '\007' re-fixed.
This commit is contained in:
parent
d65fa2a35d
commit
3c05c6815b
15
src/parallel
15
src/parallel
|
@ -860,8 +860,8 @@ sub parse_options {
|
|||
if(defined $opt::X) { $Global::ContextReplace = 1; }
|
||||
if(defined $opt::silent) { $Global::verbose = 0; }
|
||||
if(defined $opt::0) { $/ = "\0"; }
|
||||
if(defined $opt::d) { my $e="sprintf qq{$opt::d}"; $/ = eval $e; }
|
||||
if(defined $opt::tagstring) { my $e="sprintf qq{$opt::tagstring}"; $opt::tagstring = eval $e; }
|
||||
if(defined $opt::d) { $/ = unquote_printf($opt::d) }
|
||||
if(defined $opt::tagstring) { $opt::tagstring = unquote_printf($opt::tagstring); }
|
||||
if(defined $opt::p) { $Global::interactive = $opt::p; }
|
||||
if(defined $opt::q) { $Global::quoting = 1; }
|
||||
if(defined $opt::r) { $Global::ignore_empty = 1; }
|
||||
|
@ -1567,6 +1567,17 @@ sub perl_quote_scalar {
|
|||
return $a;
|
||||
}
|
||||
|
||||
sub unquote_printf {
|
||||
# Convert \t \n \r \0 \000
|
||||
$_ = shift;
|
||||
s/\\t/\t/g;
|
||||
s/\\n/\n/g;
|
||||
s/\\r/\r/g;
|
||||
s/\\(\d\d\d)/eval 'sprintf "\\'.$1.'"'/ge;
|
||||
s/\\(\d)/eval 'sprintf "\\'.$1.'"'/ge;
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub __FILEHANDLES__ {}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue