- or download this
: '7th edition Bourne shell aka the V7 shell did not know # as com
+ment sign, yet.'
: 'Workaround: the argument to the : null command can be considere
+d a comment,'
: 'protect it, because the shell would have to parse it otherwise.
+'
- or download this
sub shell_comment_quote {
return '' unless @_;
...
s/\n/\n#/g;
return $_;
}
- or download this
sub shell_quote {
my ($rerr, $s) = _shell_quote_backend @_;
...
}
return $s;
}
- or download this
sub shell_quote_best_effort {
my ($rerr, $s) = _shell_quote_backend @_;
return $s;
}
- or download this
sub _shell_quote_backend {
my @in = @_;
...
return \@err, $ret;
}
- or download this
sub _shell_quote_backend {
my @in = @_;
...
chop $ret;
return \@err, $ret;
}
- or download this
>bash --version
GNU bash, version 4.3.48(1)-release (x86_64-slackware-linux-gnu)
...
>! foo
-bash: foo: command not found
>
- or download this
>bash --version
GNU bash, version 4.3.48(1)-release (x86_64-slackware-linux-gnu)
...
>! 'FOO=BAR' baz
-bash: FOO=BAR: command not found
>