Max number of parameters to korn shell?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Max number of parameters to korn shell?
# 1  
Old 02-03-2006
Max number of parameters to korn shell?

Hi All,

what is the maximum limit for the command line arguments in korn shell.


Regards,
Raju
# 2  
Old 02-03-2006
think it's 10.. $0, $1.. $9.. where $0 is the name of script itself for which u take the rest of the arguments..

any corrections there?
# 3  
Old 02-03-2006
It can be a very large number if you use shift(1). In Solaris, I believe the actual number is controlled by _POSIX_ARG_MAX which is 4096 defined in /usr/include/limits.h. My experience with AIX indicates a much lower number, possibly 1024.
# 4  
Old 02-03-2006
Hi Sirisha thanks for your immediate response.

Its not 10.
Its accepting more than that, I tried for 20 also, its taking.

Regards,
Srini
# 5  
Old 02-03-2006
Thanks Hegemaro
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a shell script in a loop with max number of threads

hi guys. i have a question for you i have a one file and inside this file there are 1000 lines and each line is a linux command running this commands takes long time so i want to create one bash script and run this lines in a loop with max number of threads for example i want to run... (2 Replies)
Discussion started by: avtaritet
2 Replies

2. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

3. Shell Programming and Scripting

Korn Shell manipulating the string into dynamic currency number

Conversion of string into currency value.. ex1: number_of_positions=2 input_string=345987 Output= 345,987.00 ex2: number_of_positions=4 input_string=1345987 Output= 1,345,987.0000 Please respond as soon as possible edit by bakunin: we will gladly respond as soon as... (15 Replies)
Discussion started by: suren.bills
15 Replies

4. Shell Programming and Scripting

Max number of variables?

Hi Folks.Just out of interest does anyone know if their is a maximum number of variables that korn shell supports and if so how do I query what it is?Cheers (1 Reply)
Discussion started by: steadyonabix
1 Replies

5. Shell Programming and Scripting

Korn Shell - Finding lowest number of a file.

I'm writing a KSH script that will get a file on the command line (such as input.txt), and in this file there is on number per line. The program needs to take the file, read each and determine the lowest number in the file. I currently have a while loop setup that will correctly out put every... (8 Replies)
Discussion started by: denyal
8 Replies

6. Shell Programming and Scripting

find max number

Hi, i have a file with numbers in it and i was wondering if there's a script i could use to find the max number and have that printed to a new file? example a.txt 18 26 47 34 27 so find the max number in a.txt and print it to b.txt. Thanks! (17 Replies)
Discussion started by: moonbaby
17 Replies

7. Solaris

Max. Possible number of IOs

Hi, Is there a way to find out the maximum possible number of IOs on a Solaris Servers. I'm using SUN Fire V240 (2 Replies)
Discussion started by: justsam
2 Replies

8. Shell Programming and Scripting

Max NO of parameters

1> Can anyone tell me what is the maximum no of parameters that can be passed to a file 2> i have 100 files amongst which in 500 files i have a string which needs to be searched how would get the names of those files. (1 Reply)
Discussion started by: Shivdatta
1 Replies

9. Shell Programming and Scripting

generate random number in korn shell

I want to be able to generate a random number within a korn shell script.. Preferably i would like to be able to state how many digits should be in this random number... ie 4 digits or 5 digits etc Any ideas? (2 Replies)
Discussion started by: frustrated1
2 Replies

10. Shell Programming and Scripting

Number of parameters to a shell script

Is there any restriction on number of parameters can be passed on to the shell script? I found, after 9th parameter for parameter 10, it is taking parameter 1. (1 Reply)
Discussion started by: videsh77
1 Replies
Login or Register to Ask a Question