mirror of
https://github.com/uutils/coreutils
synced 2024-12-15 07:42:48 +00:00
printf.md: support %q
This commit is contained in:
parent
91a91458e7
commit
7279bc1741
1 changed files with 8 additions and 0 deletions
|
@ -78,6 +78,9 @@ Fields
|
|||
second parameter is min-width, integer
|
||||
output below that width is padded with leading zeroes
|
||||
|
||||
* `%q`: ARGUMENT is printed in a format that can be reused as shell input, escaping non-printable
|
||||
characters with the proposed POSIX $'' syntax.
|
||||
|
||||
* `%f` or `%F`: decimal floating point value
|
||||
* `%e` or `%E`: scientific notation floating point value
|
||||
* `%g` or `%G`: shorter of specially interpreted decimal or SciNote floating point value.
|
||||
|
@ -181,6 +184,11 @@ All string fields have a 'max width' parameter
|
|||
still be interpreted and not throw a warning, you will have problems if you use this for a
|
||||
literal whose code begins with zero, as it will be viewed as in `\\0NNN` form.)
|
||||
|
||||
* `%q`: escaped string - the string in a format that can be reused as input by most shells.
|
||||
Non-printable characters are escaped with the POSIX proposed ‘$''’ syntax,
|
||||
and shell meta-characters are quoted appropriately.
|
||||
This is an equivalent format to ls --quoting=shell-escape output.
|
||||
|
||||
#### CHAR SUBSTITUTIONS
|
||||
|
||||
The character field does not have a secondary parameter.
|
||||
|
|
Loading…
Reference in a new issue