mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: '-quoting for rc-shell.
This commit is contained in:
parent
1a6ddb891e
commit
2ca7b7f201
|
@ -1660,7 +1660,7 @@ sub shell_quote_scalar {
|
|||
if(defined $a) {
|
||||
if(($a =~ s/'/''/g)
|
||||
+
|
||||
($a =~ s/[\n\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\^\*\<\=\>\~\|\; \"\!\$\&\202-\377]/'$&'/go)) {
|
||||
($a =~ s/[\n\002-\011\013-\032\\\#\?\`\(\)\{\}\[\]\^\*\<\=\>\~\|\; \"\!\$\&\202-\377]+/'$&'/go)) {
|
||||
# A string was replaced
|
||||
# No need to test for "" or \0
|
||||
} elsif($a eq "") {
|
||||
|
|
|
@ -158,6 +158,19 @@ echo '### bug #44995: parallel echo {#} ::: 1 2 ::: 1 2'
|
|||
|
||||
parallel -k echo {#} ::: 1 2 ::: 1 2
|
||||
|
||||
echo '**'
|
||||
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=bash parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=fish parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=ash parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=dash parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=sh parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=rc parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=csh parallel -0 echo
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=tcsh parallel -0 echo
|
||||
|
||||
echo '**'
|
||||
|
||||
EOF
|
||||
echo '### 1 .par file from --files expected'
|
||||
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | wc -l
|
||||
|
|
|
@ -332,5 +332,33 @@ parallel -k echo {#} ::: 1 2 ::: 1 2
|
|||
2
|
||||
3
|
||||
4
|
||||
echo '**'
|
||||
**
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=bash parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=fish parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=ash parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=dash parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=sh parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=rc parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=csh parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
printf '"#&/\n()*=?'"'" | PARALLEL_SHELL=tcsh parallel -0 echo
|
||||
"#&/
|
||||
()*=?'
|
||||
echo '**'
|
||||
**
|
||||
### 1 .par file from --files expected
|
||||
1
|
||||
|
|
Loading…
Reference in a new issue