Re: What version of korn shell?
From: --==[bman]==-- (bmynars_at_verizon.net)
Date: 06/28/04
- Next message: Buttocks: "Homer & Marge having sex with Bart Simpson"
- Previous message: Shashank: "Re: gcc 2.96"
- In reply to: Bo Thide': "Re: What version of korn shell?"
- Next in thread: Optonline News: "Re: What version of korn shell?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Jun 2004 01:03:21 GMT
Bo Thide' wrote:
> "--==[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
>
Hi Bo,
Actually, even dtksh will generate an error with a subscript greater
than 4096. There is still a limit but at least, your can have four
times as many subscripts as with the original ksh.
--
__ _
/ / (_)___ __ ___ __
/ / / / __ \/ / / / |/_/
/ /___/ / / / / /_/ /> <
/_____/_/_/ /_/\__,_/_/|_| is what you make of it.
- Next message: Buttocks: "Homer & Marge having sex with Bart Simpson"
- Previous message: Shashank: "Re: gcc 2.96"
- In reply to: Bo Thide': "Re: What version of korn shell?"
- Next in thread: Optonline News: "Re: What version of korn shell?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]