Format and Print Data

From 6bit.ch wiki
Revision as of 15:16, 17 March 2023 by Xbl (talk | contribs) (Created page with "= printf = Print ARGUMENT(S) according to FORMAT, or execute according to OPTION.</br> <code>printf FORMAT [ARGUMENT]</code></br> <code>printf OPTION</code></br> FORMAT controls the output as in C printf. Interpreted sequences are:</br> <code>\n</code> new line</br> <code>%s</code> output as string</br> <code>%d</code> output as integer</br> Example:</br> <code>printf '%s\n' yolo</code>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

printf

Print ARGUMENT(S) according to FORMAT, or execute according to OPTION.

printf FORMAT [ARGUMENT]
printf OPTION

FORMAT controls the output as in C printf. Interpreted sequences are:
\n new line
%s output as string
%d output as integer

Example:
printf '%s\n' yolo