[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21749: printf --help not working
From: |
Eric Blake |
Subject: |
bug#21749: printf --help not working |
Date: |
Sat, 24 Oct 2015 11:45:00 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
tag 21749 notabug
thanks
On 10/24/2015 04:36 AM, Andreas Kern wrote:
> steps to reproduce
>
> run `printf --help`
That's probably running your shell's builtin printf, rather than the one
from coreutils.
Try:
env printf --help
or
/bin/printf --help
and to see the difference, try:
type printf
> comment:
> I checked it on ubuntu and on arch, both don't print the help. I checked
> the source package on ubuntu and there is code for that in printf.c
If you read the source code, you may also notice that coreutils' 'printf
--help' includes this text:
$ env printf --help | tail
and all C format specifications ending with one of diouxXfeEgGcs, with
ARGUMENTs converted to proper type first. Variable widths are handled.
NOTE: your shell may have its own version of printf, which usually
supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'printf invocation'
As such, I'm closing this as not a bug, although you should feel free to
make further comments. Also, future bash releases may be adding support
for 'printf --help' with the bash builtin printf, to match the fact that
ksh builtin printf already accepts that option; but that won't help for
dash, which is Ubuntu's /bin/sh.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature