Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/doc/autogen/autogen.html/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Next: SCM shellf, Previous: SCM shell, Up: Common Functions [Contents][Index] 3.5.30 shell-str - double quote shell stringUsage: (shell-str string)
Notice: some shells will not correctly handle unusual non-printing characters. This routine works for most reasonably conventional ASCII strings. WARNING:
All others characters are copied directly into the output. The Meanwhile, the best way to document is with a detailed output example.
If the backslashes make it through the text processing correctly,
below you will see what happens with three example strings. The first
example string contains a list of quoted foo[0] ''foo'' 'foo' "foo" `foo` $foo raw-shell-str -> \'\''foo'\'\'' '\''foo'\'' "foo" `foo` $foo' shell-str -> "''foo'' 'foo' \"foo\" `foo` $foo" sub-shell-str -> `''foo'' 'foo' "foo" \`foo\` $foo` foo[1] \'bar\' \"bar\" \`bar\` \$bar raw-shell-str -> '\'\''bar\'\'' \"bar\" \`bar\` \$bar' shell-str -> "\\'bar\\' \\\"bar\\\" \`bar\` \$bar" sub-shell-str -> `\\'bar\\' \"bar\" \\\`bar\\\` \$bar` foo[2] \\'BAZ\\' \\"BAZ\\" \\`BAZ\\` \\$BAZ raw-shell-str -> '\\'\''BAZ\\'\'' \\"BAZ\\" \\`BAZ\\` \\$BAZ' shell-str -> "\\\\'BAZ\\\\' \\\\\"BAZ\\\\\" \\\`BAZ\\\` \\\$BAZ" sub-shell-str -> `\\\\'BAZ\\\\' \\\"BAZ\\\" \\\\\`BAZ\\\\\` \\\$BAZ` There should be four, three, five and three backslashes for the four examples on the last line, respectively. The next to last line should have four, five, three and three backslashes. If this was not accurately reproduced, take a look at the agen5/test/shell.test test. Notice the backslashes in front of the dollar signs. It goes from zero to one to three for the "cooked" string examples. Arguments:
Next: SCM shellf, Previous: SCM shell, Up: Common Functions [Contents][Index] |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]-- |