bug-gnu-utils
[Top][All Lists]
Advanced

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

printf(1) Info page cause for long thought


From: Dan Jacobson
Subject: printf(1) Info page cause for long thought
Date: 11 Feb 2002 16:45:02 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

|
|`printf': Format and print data
|===============================
|
|   `printf' does formatted printing of text. Synopsis:
|
|     printf FORMAT [ARGUMENT]...
|
|   `printf' prints the FORMAT string, interpreting `%' directives and
|`\' escapes in the same way as the C `printf' function.  The FORMAT

$ /usr/bin/printf %c 54
5$ /usr/bin/printf %c , 54
,5$ /usr/bin/printf '"%c"' , 54
",""5"$ 

doesn't seem too similar to printf(3) here.  I want the 54th ASCII
character emitted.  The quoting biz is different too... some examples
wouldn't hurt your Info page... perhaps telling us what is going thru
printf(1)'s head above.

|argument is re-used as necessary to convert all of the given
|ARGUMENTs.

add examples.

|   `printf' has one additional directive, `%b', which prints its
|argument string with `\' escapes interpreted in the same way as in the
|FORMAT string.

I seemed to have burned out those exact brain cells I needed to
understand this phrase somewhere in my youth.  add examples.

|   `printf' interprets `\0ooo' in FORMAT as an octal number (if OOO is
|0 to 3 octal digits) specifying a character to print, and `\xhhh' as a
|hexadecimal number (if HHH is 1 to 3 hex digits) specifying a character
|to print.

OK, but a picture is worth a 1000 words.

|   An additional escape, `\c', causes `printf' to produce no further
|output.

Can we have some action shots of this in action on the new Info page?

|   The only options are a lone `--help' or `--version'.  *Note Common
|options::.

which don't work if intercepted by the bash built-in which should be
mentioned, unless it's "haze the newbie day".
-- 
http://www.geocities.com/jidanni/ Taiwan(04)25854780



reply via email to

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