Re: What version of korn shell?
From: Bo Thide' (bt_at_irfu.se)
Date: 06/27/04
- Previous message: Johannes Raspe: "X-header-files 10.20"
- In reply to: --==[bman]==--: "Re: What version of korn shell?"
- Next in thread: --==[bman]==--: "Re: What version of korn shell?"
- Reply: --==[bman]==--: "Re: What version of korn shell?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 27 Jun 2004 09:40:12 +0200
"--==[bman]==--" wrote:
>
> --==[bman]==-- wrote:
> > I am not sure what the problem is so maybe someone will help me out
> > here. What version of Korn shell is factory installed on HP-UX systems
> > (10.x, 11.x)? I am always running into a problem of a "subscript" being
> > too large which is at 1024 which is a limitation of Korn 88 and before.
> > I have tried calling my scripts with /usr/bin/ksh, /bin/sh (which is
> > exhibits the same behavior as Korn) but always with the same results.
> >
> > I cannot create an array with more than 1024 elements (subscripts). No
> > problem in Bash or pdksh.
> >
> > Any ideas?
> >
> > Thanks.
> >
>
> O.K. I will it my own words. pdksh on my SuSE 9.1 has the same
> problem. Piece of code:
>
> typeset -i i=0
> while [ $i -lt 1025 ]; do
> myArry[(( i+=1 ))]=$i
> done
>
> This code will generate "pdksh: myArry: subscript out of range". The
> same results will be on standard ksh shell on HPUX. I cannot believe
> that I am limited to 1024 elements/subscripts in the array here!
The 'ksh' in HP-UX 11.11 will generate the "subscript out of range".
The 'dtksh' in the same OS will not.
Hope this helps,
Bo
-- Professor Dr. Bo Thidé, Head of Programme http://www.physics.irfu.se/~bt Swedish Institute of Space Physics (IRF), P.O. Box 537, SE-752 21 Uppsala Phone: 018-471 59 14 Fax: 018-471 59 05 Mobile Phone: 0705-61 36 70 Visiting adress: Ångström Laboratory, Room #14144, Lägerhyddsvägen 1, Uppsala LOIS Space Centre, MSI, SE-351 95 Växjö http://www.physics.irfu.se/LOIS
- Previous message: Johannes Raspe: "X-header-files 10.20"
- In reply to: --==[bman]==--: "Re: What version of korn shell?"
- Next in thread: --==[bman]==--: "Re: What version of korn shell?"
- Reply: --==[bman]==--: "Re: What version of korn shell?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|