Connecting Tech Pros Worldwide Forums | Help | Site Map

How many arguments..

Member
 
Join Date: Mar 2008
Posts: 32
#1: Oct 9 '09
Hi,

Can anybody tell me the answer of that question:

Maximum how many arguments we can pass a shell script??



Thanks,
DKS

Tarantulus's Avatar
Member
 
Join Date: May 2007
Posts: 103
#2: Oct 12 '09

re: How many arguments..


I dunno about other OSes but on solaris
Expand|Select|Wrap|Line Numbers
  1. getconf ARG_MAX
will answer that for you

although I believe that as environmentals are passed using the same memoryspace as args, you would need to do X - Y where X is the output of the above command and Y is the number of environmental variables on the set in the current shell.
Reply