On 3/15/25 08:58, Philip Guenther wrote:
> No, it's not.  Per POSIX XCU 1.4, utilities that do not explicitly
> state otherwise are allowed to recognize options whether any are
> defined by the standard.  printf(1) follows that default, so for the
> first positional argument to (portably) start with a minus-sign, a --
> option must precede it, ala
>   printf -- -s
> 
> Or, you know, don't get into a habit that created a million printf(2)
> vulnerabilities and write
>   printf %s -s
> 
> instead.
> 
> Philip Guenther
> 

x500$ printf -- %s \\u0041
\u0041x500$

Thanks a lot.

-- 
Christian

Reply via email to