Help for this page

Select Code to Download


  1. 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.
    +'
    
  2. or download this
    sub shell_comment_quote {
        return '' unless @_;
    ...
        s/\n/\n#/g;
        return $_;
    }
    
  3. or download this
    sub shell_quote {
        my ($rerr, $s) = _shell_quote_backend @_;
    ...
        }
        return $s;
    }
    
  4. or download this
     
    sub shell_quote_best_effort {
        my ($rerr, $s) = _shell_quote_backend @_;
     
        return $s;
    }
    
  5. or download this
    sub _shell_quote_backend {
        my @in = @_;
    ...
     
        return \@err, $ret;
    }
    
  6. or download this
    sub _shell_quote_backend {
        my @in = @_;
    ...
        chop $ret;
        return \@err, $ret;
    }
    
  7. or download this
    >bash --version
    GNU bash, version 4.3.48(1)-release (x86_64-slackware-linux-gnu)
    ...
    >! foo
    -bash: foo: command not found
    >
    
  8. 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
    >