bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Brace expansion


From: Chet Ramey
Subject: Re: Brace expansion
Date: Mon, 6 Apr 2009 08:43:25 -0400

> 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    chet@case.edu    http://tiswww.tis.case.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]