mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 16:07:54 +00:00
parallel: Fixed bug #39507: --env does not support newlines in variables.
This commit is contained in:
parent
56e5118535
commit
81b767d324
|
@ -934,7 +934,8 @@ sub parse_options {
|
||||||
sub env_quote {
|
sub env_quote {
|
||||||
my $v = shift;
|
my $v = shift;
|
||||||
$v =~ s/([\\])/\\$1/g;
|
$v =~ s/([\\])/\\$1/g;
|
||||||
$v =~ s/([\[\] \#\'\n\&\<\>\(\)\;\{\}\t\"\$\`\*\174\!\?\~])/\\$1/g;
|
$v =~ s/([\[\] \#\'\&\<\>\(\)\;\{\}\t\"\$\`\*\174\!\?\~])/\\$1/g;
|
||||||
|
$v =~ s/\n/"\n"/g;
|
||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue