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/