>In this case, it isn't a script I wrote.
>
>It's part of a shell script that is used during a driver install for a
>Marvell Yukon Gigabit Ehternet Adapter.
>
>Sadly, Solaris' version of bourne shell? /sbin/sh allows the "bad
>syntax" I mentioned above.

It's the Solaris version of "printf"

/bin/printf ------
------ (no newline)

 ksh93 -c "printf ------"
printf: ------: unknown option
Usage: printf [ options ] format [string ...]

>I wonder if some sort of compatibility mode can be achieved for
>bourne's printf syntax.


Just a small matter of programming......


printf takes no command line options (as defined in the standard)


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).

Since "------" is perfectly valid as a format specifier, it MUST be printed
correctly.

It's unclear what options printf(ksh93) supports as I find none listed
in the manual page,.

Casper


Reply via email to