[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash printf builtin bug
From: |
Chet Ramey |
Subject: |
Re: Bash printf builtin bug |
Date: |
Wed, 30 Mar 2005 14:08:43 -0500 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Macintosh/20050317) |
Paul Jarc wrote:
> Chet Ramey <chet@caleb.ins.cwru.edu> wrote:
>
>>That's what the `--' first argument is for: don't treat any remaining
>>arguments as possible options.
>
>
> Does printf have any options? If not is there any point in giving an
> error in this case? ISTM SUSv3 requires the first argument to be a
> format string, regardless of whether it starts with "-". That's how
> coreutils does it.
The SUSv3 has `none' in the OPTIONS section of the printf description.
The description of that value in the `Utility Description Defaults'
section of the standard requires that commands which accept operands
but not options to recognize `--' and handle it appropriately.
The format string is an operand and is described as such.
The coreutils implementation is not compliant.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/