On Fri, 08 Feb 2008 15:55:42 +0100 Casper.Dik at Sun.COM wrote:
> Unfortunately, the standard does not appear to allow option processing for
> printf. The "format" must be interpreted as the format specifier for
> printf(3C) (with listed exceptions).
the standard does allow utility implementations to process options,
even when the OPTIONS section is "None", see my previous post
> Since "------" is perfectly valid as a format specifier, it MUST be printed
> correctly.
solaris printf properly handles "--"
printf -- '-----%d\n' 123
> It's unclear what options printf(ksh93) supports as I find none listed
> in the manual page,.
correct,
ksh -c 'printf --man'
(or --html) shows no options
but all (except where noted) ast (and therefore ksh93) utilities accept
the options listed by '--???'
ksh '--???'
exceptions: [ : alarm echo false test true vmap vpath
but I believe at least { alarm vmap vpath } should be self documenting
we'll address that in ksh93t
-- Glenn Fowler -- AT&T Research, Florham Park NJ --