Package: coreutils
Version: 8.30-3

Hi,

POSIX specifies printf has no options, meaning this should print "--help". 
Arguments parsing must simply not be attempted at all in order to be compliant 
as far as I know.

$ /usr/bin/printf --help
Usage: /usr/bin/printf FORMAT [ARGUMENT]...
  or:  /usr/bin/printf OPTION

  ...

>From https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html:
> SYNOPSIS
>
>    printf format [argument...]
>
> ...
>
> OPTIONS
>
>    None.

Bash also does not handle this correctly. However bash is not POSIX sh, hence 
it is not a bug. (It appears bash some some "printf -v var" extension.) I also 
tested zsh, which appears to be fully compliant.

Thanks,

-- 
Melvin Vermeeren

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to