File: sh-utils.info,  Node: printf invocation,  Next: yes invocation,  Prev: echo invocation,  Up: Printing text

`printf': Format and print data
===============================

   `printf' does formatted printing of text. Synopsis:

     printf FORMAT [ARGUMENT]...

   `printf' prints the FORMAT string, interpreting `%' directives and
`\' escapes in the same way as the C `printf' function.  The FORMAT
argument is re-used as necessary to convert all of the given ARGUMENTs.

   `printf' has one additional directive, `%b', which prints its
argument string with `\' escapes interpreted in the same way as in the
FORMAT string.

   `printf' interprets `\0ooo' in FORMAT as an octal number (if OOO is
0 to 3 octal digits) specifying a character to print, and `\xhhh' as a
hexadecimal number (if HHH is 1 to 3 hex digits) specifying a character
to print.

   An additional escape, `\c', causes `printf' to produce no further
output.

   The only options are a lone `--help' or `--version'.  *Note Common
options::.

