[ksh93-integration-discuss] Compatibility and /sbin/sh

Casper.Dik at Sun.COM Casper.Dik at Sun.COM
Tue Feb 12 01:07:46 PST 2008


>This is primarily addressed to Roland, but is applicable to anyone
>else involved in the /sbin/sh -> ksh93 effort.
>
>What is the plan to deal with compatibility between the existing
>/sbin/sh and ksh93? As an example, recently it was discovered that
>Solaris /usr/bin/printf allows a certain syntax that it shouldn't
>according to the UNIX specification. Since ksh93 has "built in"
>commands for many of these, POSIX behaviour is often enforced.

I think that it's a bit of an overstatement to suggest that
"Solaris printf accepts syntax it does not".

The standard ONLY says that a PORTABLE invocation of a program should
use "--" to escape any first argument starting with "-" and that programs
not accepting options should skip that argument.

Solaris printf does just that.

The standard does NOT require an argument of the form -------- to elicit
an error.

>As the evaluation of ksh93 as a replacement for /bin/sh progresses, I
>expect there to be a lot more cases where ksh93 (rightfully) causes
>some programs to break due to non-POSIX compliance in the current
>Solaris environment.

Those do exist but printf isn't one of them.

Casper



More information about the ksh93-integration-discuss mailing list