From: Ivan Shmakov on
>>>>> Stephane CHAZELAS <stephane_chazelas(a)yahoo.fr> writes:

[...]

> Same, instead of "man 3 printf" you can do "info libc --index-search
> printf" (info libc printf works as well but gets you to another
> printf related topic unfortunately), and you get the context
> around. Again, same principle as a book. You look in the index of
> your libc book for printf and are taken to the "formatted output"
> section.

> Or you can do "info coreutils printf" for the printf command (man 1
> printf).

Thanks for the comments. These bits about the stand-alone Info
invocation are particularly interesting to me because I don't
use it at all, and thus don't know much about it.

>> I said "GNU coding standards". Not "every last possible thing which
>> GNU has ever specified". (That said: Consider "true --help" or
>> "echo --version".)

> $ true --help
> Usage: /bin/true [ignored command line arguments]
> or: /bin/true OPTION
> Exit with a status code indicating success.

> --help display this help and exit
> --version output version information and exit

Still I wonder, may it cause a clash with some standard? I've
always thought that $ true ... and $ false ... are basically
dumb plugs, designed to have no effect other than returning an
exit code.

> NOTE: your shell may have its own version of true, which usually
> supersedes the version described here.

Indeed.

[...]

> POSIX and LSB specifies that "echo --version" should output
> "--version<LF>" (just as "echo -e" should output "-e<LF>" in
> POSIX but not LSB).

Given that the echo behavior may have subtle differences between
implementations and standards, I'd generally tend to advice
against its use and in favor of printf.

--
FSF associate member #7257
First  |  Prev  | 
Pages: 1 2 3 4 5 6 7
Prev: Remove certain characters in a filename
Next: x12a403