s6-portable-utils
Software
skarnet.org
The s6-quote program
s6-quote quotes a string and writes it to stdout.
Interface
s6-quote [ -n ] [ -u ] [ -d delim ] string
- s6-quote quotes string, putting it inside double quotes
and escaping all dubious characters
- It writes the quoted string to stdout and exits 0
Options
- -n : do not print a trailing newline
- -u : do not put string inside double quotes, only escape
characters if needed
- -d delim : use the first character of delim
as a quote character, instead of double quotes
Notes
- Quoted strings are guaranteed to be pure printable ASCII, without control characters.
- Quoted strings can be unquoted via the s6-unquote or
s6-unquote-filter programs.
- Quoted strings are suitable for interpretation by
execlineb.