Where is the offline reference of the format specifiers (e.g., %i
, %s
) which are supported by the Bash/system printf
command? I've looked in help printf
, man 1 printf
and man 3 printf
without luck.
man 1 printf
mentions says it supports
%% a single %
%b ARGUMENT as a string with `\' escapes interpreted, except that octal escapes are of the form \0 or \0NNN
and all C format specifications ending with one of diouxXfeEgGcs, with ARGUMENTs converted to proper type first. Variable widths are handled.
The character list is useful, but doesn't explain the exact semantics of each format specification.
printf
entry inman bash
refers toman 1 printf
and contains additional format specifiers like%b
,%q
etc. – jofel Dec 19 '12 at 09:10