This content has been marked as final. Show 4 replies
As far as I know, Solaris 10 has a default Bourne Shell /sbin/sh, not ksh88. Solaris provides ksh93 in the form of dtksh (/usr/dt/bin/dtksh). dtksh is based on ksh-93 with X Toolkit Intrinsics (Xt) and Motif bindings, so that you can write Motif GUIs in ksh.1 person found this helpful
For what it's worth, ksh-93 is backwards compatible with ksh-88 beside a few exceptions:
• Variables in functions declared with the "name()" syntax are no longer local.
• ksh-93 does not set the ERRNO environment variable.
• Testing for string equality via the "=" operator is supported, but obsolete. Instead, use "==".
• The "-x" option to alias is no longer supported.
• The "-f" option to typeset is no longer supported.
• The output formats of some built-in functions including set, typeset, and alias has changed.
Thanks for your answer. Our systems people are worried about the impact to the system if we link /bin/ksh to dtksh.
If Bourne is the default, and as this is a standard VM Solaris 10 build, I can't see any impact?
You should be fine linking /bin/ksh (acutally /usr/bin/ksh). Just leave /sbin/sh alone.1 person found this helpful
So this works on ksh 88 on Sol 10 but not on dtksh
if [[ -s filename ]] then
if [[ -s filename ]] ; then
works on both