> So... what gives??? I tried looking at info coreutils 'printf > invocation', and it does not even explicitly spell out what the %d > argument means, instead it just tells me "it's like the C printf, except > for these differences". I have never used C, and have no idea where to > look it up, so what good is that info page??? I'm trying to learn bash, > and have no desire to learn to program in C.
The advantage of the C language printf is that it is familiar and well- specified. The entire rationale for implementing a command-line version is to leverage that familiarity. The best place to look up the specification is the Open Group standard: http://www.opengroup.org/onlinepubs/9699919799/utilities/printf.html#tag_20_94 and the description of the format string: http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tag_05 (In this case, the answer is that numeric constants beginning with a `0' are interpreted as octal numbers.) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://tiswww.tis.case.edu/~chet/