On Mon, Jul 10, 2000 at 10:02:05AM -0700, Kevin Buettner wrote:
> On Jul 9, 11:56pm, Jonathan Furrer wrote:
>
> > Is there any limit to the number of sub lines i.e.:
> >
> > command \
> > arg1 \
> > arg2
> >
> > that one can use? Assuming this is shell dependant, lets say in bash
>
> I think the limit is going to be influenced by one of _POSIX_ARG_MAX
> or the value returned by sysconf(_SC_ARG_MAX). The former is the
> minimum value that a posix compliant system must support and the
> latter is the actual value on the system in question. In either
> case, the constant _POSIX_ARG_MAX or the value returned from calling
> sysconf(_SC_ARG_MAX) represents the "maximum length of arguments to
> execve including environment". (From <bits/posix1_lim.h>.)
>
> On my RH 6.2 system, _POSIX_ARG_MAX is defined to be 4096 (in
> /usr/include/bits/posix1_lim.h). The value returned by
> sysconf(_SC_ARG_MAX) is 131072.
>
> So, I would think the maximum number of continuation lines would be
>
> sysconf(_SC_ARG_MAX) - number of environment pairs
Interesting.
Additionally I think tcsh has a limit of 1024 for the length of any
command-line. I had to switch to bash at work because my CLASSPATH
(Java's equivalent of library path) got too long.
--
_______ Shawn T. Rutledge / KB7PWD ecloud@bigfoot.com
(_ | |_) http://www.bigfoot.com/~ecloud kb7pwd@kb7pwd.ampr.org
__) | | \________________________________________________________________
Get money for spare CPU cycles at http://www.ProcessTree.com/?sponsor=5903