![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing runtime arguments to a shell script... | santy | Shell Programming and Scripting | 10 | 01-09-2009 10:47 PM |
| Passing arguments to a shell script from file while scheduling in cron | weblogicsupport | SUN Solaris | 4 | 01-27-2008 11:16 PM |
| To Write a Shell script that takes two arguments. | bobby36 | Shell Programming and Scripting | 3 | 04-05-2007 08:44 PM |
| How to pass arguments to a function in a shell script? | preetikate | Shell Programming and Scripting | 3 | 03-01-2004 04:55 AM |
| Shell script with arguments | sankar6254 | Shell Programming and Scripting | 3 | 12-22-2003 09:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Is there a limit to the no. of arguments to a shell script ?
What is the maximum no. of arguments that could be passed to a shell script ? Is there any restriction ?
I've a requirement where I need to pass a list of names to a unix script and I guess the number of such names is not a fixed one. It can run into hundreds. Is this feasible ? |
|
||||
|
Agreed with Tyatalus that it is system dependent. But tried on posix and bash shell , and the maxmium number of arguments you can pass to a script is 9. If you want to pass more parametrs , you need to use the shift function.
The intresting thing is , more than 9 parameters works fine if numbers are given , but gives unexpected output when tried with letters. So if you are using some other shell, try testing it with letters. Thanks! nua7 |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| bash, bash eval, eval |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|