Package: dash
Version: 0.5.10.2-5

Hi,

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

$ printf -h
sh: 1: printf: Illegal option -h
$ printf --help
sh: 2: printf: Illegal 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