s6-portable-utils: the s6-unquote-filter program
Keywords: s6-portable-utils command s6-unquote-filter unquote filter

s6-portable-utils
Software
skarnet.org

# The `s6-unquote-filter` program

s6-unquote acts as a filter, reading quoted strings on stdin, unquoting them and writing the results to stdout.

## Interface

         s6-unquote-filter [ -q | -Q | -v | -w ] [ -d delim ]

- s6-unquote-filter reads lines on stdin. It exits 0 on EOF.
- It expects read lines to follow the syntax of s6-quote's output strings
- Depending on the strictness options, it prints various warning or error messages to stderr if it cannot properly unquote lines. In the very strict mode, it exits 100 on the first unquoting error.
- If it is successful at unquoting, it prints the resulting lines to stdout.

## Options

- `-d` delim : a list of characters that will be considered as delimiters (to start and end the quoted string). By default, only the double quote is such a character. If delim is the empty string, s6-unquote-filter interprets string as non-delimited, only escaped (i.e. for instance the result of some `s6-quote-filter -u` operation).
- `-q` : loose/quiet mode. s6-unquote-filter will silently accommodate errors.
- `-Q` : normal mode. This is the default. s6-unquote-filter will warn on errors.
- `-v` : strict/verbose mode. s6-unquote-filter will warn loudly on errors, with many details.
- `-w` : very strict mode. s6-unquote-filter will complain and die on the first unquoting error it encounters.

## Notes

- Quoted strings can be produced via the s6-quote or s6-quote-filter programs.