i have a shell script which takes several args. what is the maximum length of string i can give as argument?
ARG_MAX is configurable for your system. This is the total bytes in all of the arguments passed to exec. If you try this:
grep 'ARG_MAX' /usr/include/limits.h
it will display the value for your system. It is usually pretty big.
In my case i could not find any "ARG_MAX" in /usr/include/limits.h file.. Then i think there should be a default value .. what it is?
Which OS you are using?
I am using LINUX
Look into /usr/include/linux/limits.h
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
Thanks Vino .. i got it