: >While it'd certainly be nice to be able to assume that ksh everywhere
: >is ksh93, the reality is that it's much more likely to be ksh88.
: All you need to do is to go to http://www.kornshell.com/
: and download ksh93 binaries.
: I don't understand why this is hard to do?
Why is it so hard for you to consider whether a given "neat trick"
will work under both ksh88 and ksh93 before posting it, unqualified,
to comp.unix.shell as a solution to someone's ksh question when the
OP didn't specify which version of ksh they're using?
Just because *you* prefer ksh93 over ksh88 does not mean that everyone
is suddenly going to stop using ksh88 in favor of ksh93.
: And why should Linux
: not to include the true ksh93?
Don't know. Don't care. The fact remains that they ship pdksh.
: Have we agreed that, if $i passed the test:
: (( $i == 0 )) || (( $i ))
: Then $i is a number which can be handled by ksh ((...)).
No. You've proven that $i contains either an arithmatic expression that ksh
is capable of evaluating, or the name of another variable which does
contain an arithmatic expression not that $i is a number.
If that was written as:
(( i == 0 )) || (( i ))
you'd have at least proven that $i contained an arithmatic expression.
"...Microsoft follows standards. In much the same manner that fish follow
migrating caribou." "Now I have this image in my mind of a fish embracing and
extending a caribou." -- Paul Tomblin and Christian Bauernfeind in the SDM