On 5/5/14, 7:09 AM, Dan Douglas wrote:
> Just a heads up on something I hadn't noticed: Bash (and dash) treat
> octal literals in printf precision inconsistently (using glibc -- not
> sure if it's a bug or GNUism on that end or the shell):
>
> $ bash -c 'printf "<%.010d> <%.*d>\n" 1 010 1'
> <0000000001> <00000001>
Bash uses the libc printf engine; the printf builtin just marshals
arguments and calls vfprintf.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/