while read paramdoArray[$i]=$param y=`expr $y + 1`doneWhen 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 wh . 1 members have posted answers.">
GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Operating System  >  Shell Scripting
Go To First  |  Previous Question  |  Next Question 
 Shell Scripting  |  Question 29 of 47    Print  
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

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

  
Total Answers and Comments: 1 Last Update: February 21, 2007     Asked by: sharifhere 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 21, 2007 09:53:22   #1  
Anto        

RE: Folks,I have peculiar kind of error. m...


If u use array it's a static one in the sense fixed size.

If u want to increase the size use vector which allocates size dynamically at runtime as much as u want.


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : by using  :                 exec

Latest Answer : Broadly categorised in 3 for  while until ...

Latest Answer : The best way is to open a read only file. use SUDO, because you do not know what or who is the owner of the file in this scenario. ...

Latest Answer : global variable is created using export command in ksh - export x='name' In csh its created using setenv command-setenv x 'name'this 'x' variable will be visible in current shell as well as in child shell also.local variable ...

If you have a string "one two three", Which shell command would you use to extract the strings?

Latest Answer : Both of these work.cat test.sh | grep ^$grep -v . test.sh ...

When you login to a c shell, which script would be run first? (before the terminal is ready for the user)

Latest Answer : substring=${string_variable_name:starting_position:length} ...

Latest Answer : cat test.txt | head -25 | tail -1 ...

Latest Answer : search for the character n in filename and replace it with xyz.sed 's/n/xyz/g' filename ...


 Sponsored Links

 
Related Articles

Microsoft AJAX Library - JavaScript Execution Context

JavaScript Execution Context In this section we ll take a peek under the hood of the JavaScript closures and the mechanisms that allow us to create classes objects and object members in JavaScript For most cases understanding these mechanisms isn t absolutely necessary for writing JavaScript code&am
 

C++ Function Passing Types

C Function Passing Types In this C tutorial you will learn about function passing types two types of arguments passing in functions passed by value  and  passed by reference are discussed here mosgoogle center The arguments passed to a function can be performed in two ways Passed
 

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

What is Data Element

In some aspects of information technology, a data element is referred to as any named unit of data which may or may not consist of other data items. In many electronic record keeping applications, a data element is a combination of bytes or characters which refer to a separate item of information li
 

What is Data File

In a logical data model, the conceptual data model which is based on the business semantic is being defined. Thus, entities and relationships and corresponding table and column design, object oriented classes, and XML tags, among other things are being laid regardless of the database will be physica
 

How to call C header that is not provided generally by system in C++?

Headers can be called by using extern C Syntax of extern C is: extern "C" <function declaration> for example to call C functions from C++ we can write extern "C" { <function declaration> <function declaration> ...
 

System Implementation

In the previous articles relating to SDLC Stages we discussed about Project Planning and Feasibility Study moved on to System Analysis and Requirements which lead to Systems Design. Systems Design will naturally lead to another stage where it becomes closer to the actual deployment of the p
 

System Analysis and Requirements

In the previous chapter, we’ve discussed about project planning and feasibility study. That stage was important because it tries to establish a problem in our highly technological world. As our understanding on what we can do in computers evolve and so are the things that we need to make t
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape