Re: What version of korn shell?

From: Bo Thide' (bt_at_irfu.se)
Date: 06/27/04

  • Next message: Bo Thide': "Re: What version of korn shell?"
    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
    

  • Next message: Bo Thide': "Re: What version of korn shell?"

    Relevant Pages

    • Re: #47 bulbs vrs #44 bulbs
      ... I use #755 too, which are *almost at bright* (be quiet Korn*), but ... last 6 times longer. ... I put them in the head so I should't have to ...
      (rec.games.pinball)
    • Re: Different code behaviour in Unix & Windows
      ... debugging. ... Then post an example that exhibits your problem. ... a bell in someone's head, if there happens to be someone out there ... Keith Thompson kst-u@xxxxxxx ...
      (comp.lang.c)
    • O/T - First the Sky box goes tits up, now the dishwasher
      ... Anyone else here got a Bosch dishwasher that exhibits the following ... Programme starts, time remaining shows about 80 minutes, but when it ...
      (uk.media.tv.misc)