2019-07-23 00:56:59 +0700, k...@munnari.oz.au: [...] > POSIX specifies that printf(1) has no options, and by not > specifying that it is intended to comply with XBD 12.2 effectivly > says that it is not. That is, in printf, the first arg is > always the format string, whatever it contains. [...]
If that was the case, then that would be bug in the POSIX specification. I can't find a single printf implementations where printf -- outputs -- (I tried bash, zsh, ksh93, GNU, yash, busybox, busybox ash, Solaris /bin/printf). Even if POSIX didn't mandate printf -- -%s x to output -x, I'd say it would be a bug in the POSIX specification (it looks like it is). -- Stephane