[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect option processing in builtin printf(1)

From: Stephane Chazelas
Subject: Re: Incorrect option processing in builtin printf(1)
Date: Mon, 22 Jul 2019 20:48:44 +0100
User-agent: NeoMutt/20171215

2019-07-23 00:56:59 +0700, kre@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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]