printf (Unix)

In Unix and Unix-like operating systems, printf is a shell builtin (and utility program[2]) that formats and outputs text like the same-named C function.

In addition to the standard format specifiers, %b causes the command to expand backslash escape sequences (for example \n for newline), and %q outputs an item that can be used as shell input.

Unused format specs provide a zero value or null string.

printf is part of the X/Open Portability Guide since issue 4 of 1992.

[5] The version of printf bundled in GNU coreutils was written by David MacKenzie.