Results 1 to 3 of 3

Thread: Script Error

  1. #1
    Contributing Member
    Join Date
    Dec 2006
    Answers
    39

    Script Error

    Folks,

    I have peculiar kind of error. my script goes like

    cat inputfile> while read param
    do
    Array[$i]=$param
    y=`expr $y + 1`
    done
    Output:-


    array[1]=line1
    array[2]=line2
    array[3]=line3
    .
    .
    .
    .
    array[4095]=line
    ksh: script out of range


    When i run script passing very large input file. script abends in the middle of execution saying "ksh: script out of range"
    Possible reason is max array element size is 4095 which is exceeded in my case. Now my question, is there any settings in shell which i can use to increase the max array element size.


    Guys please post ur suggestions.


    Thanks!
    Sharif.S


  2. #2
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: Script Error

    Well, this problem of yours will be present only KShell. (ksh). Use BASH ( Born again Shell) or a recent version of KShell.

    your problme will be solved. Otherwise there's no way to solve this problem. (None that I am aware of).

    -Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

  3. #3
    Contributing Member
    Join Date
    Dec 2006
    Answers
    39

    Re: Script Error

    Thanks kalayama.. but i have ti use only existing k sh.. i've foud round abt process for it..

    Sharif.S


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact