'printf' is not SuSv3 compliant (and maybe not POSIX...?)

DervishD <[email protected]> Mon, 19 Aug 2002 20:37:55 +0200
Newsgroups gmane.comp.gnu.sh-utils.bugs
Organization Pleyades
Message-ID <[email protected]>
    Hi all :))

    The 'printf' command (no matter the POSIXLY_CORRECT var), chokes
on the following:

    > printf -- "Hi there\n"
    --printf: warning: excess arguments have been ignored

    The correct behaviour, according to Single UNIX Specification
version 3 (don't know the POSIX behaviour), is that 'printf' shall
recognize '--' as a first argument to be discarded. That is, if I
want to print '--help', I shouldn't need to set POSIXLY_CORRECT, but
just do 'printf -- --help'.

    This can be achieved by not using 'parse_long_options' and treat
'--' specially?

    Anyway, if sh-utils are not intended to be SuSv3 compliant, could
you tell me so I don't send wrong bug reports related with this?
Thanks a lot, and thanks too for sh-utils :))

    Raúl