OpenSolaris

Printable Version Enter a New Search
Bug ID 6332421
Synopsis Solaris Kornshell outdated
State 11-Closed:Duplicate (Closed)
Category:Subcategory shell:korn
Keywords opensolaris
Responsible Engineer April Chin
Reported Against
Duplicate Of 4113420
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs 6437624 , 4113420
Submit Date 4-October-2005
Last Update Date 29-November-2005
Description
Category
   shell

Sub-Category
   korn

Description
   Today we ran into serious porting problems while trying to get a commercial application (Cyc) moved from Suse Linux 9.2 to Solaris 10.
The kornshell shell interpreter seems to be an obsolete version which no longer understands modern korn shell constructs such as "typeset -A" or some kind of "traps", rendering the application useless on Solaris.

Suse Linux version of ksh is
$ echo ${.sh.version}
Version M 1993-12-28 q

Solaris ksh version cannot be queried ("bad substitution" error).

Is there actually a maintainer for Solaris ksh or is there noone using this shell?

Frequency
   Always

Regression
   Solaris 10

Steps to Reproduce
   Small test script:

#!/bin/ksh
typeset -A x
x[bobby]="a"
x[dog]="b"
echo ${x[bobby]}${x[dog]}


Expected Result
   The script should output:
ab

Actual Result
   Solaris /bin/ksh generates syntax error, Suse Linux just executes this script w/o problems.

Error Message(s)
   "bad substitution"

Test Case
   #!/bin/ksh
typeset -A x
x[bobby]="a"
x[dog]="b"
echo ${x[bobby]}${x[dog]}


Workaround
   Use Linux 

Submitter wants to work on bug
   Yes

Additional configuration information
   -
Work Around
Use dtksh as *currently* supplied with CDE in /usr/dt/bin/dtksh.

Alternativly download the latest ksh from AT&T, see http://wikipedia.org/wiki/Korn_shell
Comments
N/A