bug-bash
[Top][All Lists]
Advanced

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

Re: bug in printf bash command


From: Eric Blake
Subject: Re: bug in printf bash command
Date: Sat, 21 Jul 2007 08:34:37 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070716 Thunderbird/2.0.0.5 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 7/21/2007 8:25 AM:
[thread starts at
http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00060.html]

>>> address@hidden "%02i" 09
>>> -bash: printf: 09: invalid number
>>
>> printf "%02i" 011
>>
>> gets you 09.
> 
> 
> Obviously, "Invalid octal number" would have been a more helpful error
> message.

Not as obvious, this was reported to the wrong list.  Coreutils' printf
does this:

$ /bin/printf %02i 09
/bin/printf: 09: value not completely converted

It is bash's printf which could be improved, so I'm forwarding this to the
bug-bash list.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGohl984KuGfSFAYARAujQAJ9kBTfP0R9HF21dn5FpH+X76cmZtACg0ntu
CektDEFvNbq4C4fw1IZAX5A=
=lXtC
-----END PGP SIGNATURE-----




reply via email to

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