bash limits ?

Chris F.A. Johnson c.f.a.johnson-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Sep 9 16:49:24 UTC 2004


On Thu, 9 Sep 2004, Peter L. Peres wrote:

>
> Hi, where do I find the limits with which bash was compiled ? For older and 
> newer bashes ? I believe that I am trying to do something that exceeds a hard 
> compiled limit in bash and it fails in mysterious ways. Specifically I have 
> variables that contain lists of thousands of numbers. Some of them seem to 
> disappear ...
>
> So what is the maximum number of arguments that can be passed to a for ... 
> construct, or their maximum length ? And what are the other limits ?

    Arguments to built-in commands (such as echo) and keywords (such as
    for) are limited only by available memory.

    The number of arguments that can be passed to external commands is
    system-dependent.

$ echo {1..31111} > /dev/null
$ /bin/echo {1..21111} > /dev/null
$ /bin/echo {1..31111} > /dev/null
bash: /bin/echo: Argument list too long
$

-- 
 	Chris F.A. Johnson                      http://cfaj.freeshell.org
 	=================================================================
                 Everything in moderation -- including moderation
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list