From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12835 invoked from network); 19 Oct 2006 10:36:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Oct 2006 10:36:17 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 69905 invoked from network); 19 Oct 2006 10:36:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Oct 2006 10:36:08 -0000 Received: (qmail 3145 invoked by alias); 19 Oct 2006 10:35:59 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10890 Received: (qmail 3135 invoked from network); 19 Oct 2006 10:35:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Oct 2006 10:35:57 -0000 Received: (qmail 68663 invoked from network); 19 Oct 2006 10:35:57 -0000 Received: from parhelion.firedrake.org (193.201.200.77) by a.mx.sunsite.dk with SMTP; 19 Oct 2006 10:35:56 -0000 Received: from phil by parhelion.firedrake.org with local (Exim 4.50 #1 (Debian)) id 1GaVFh-0003Ng-T4 for ; Thu, 19 Oct 2006 11:35:53 +0100 Date: Thu, 19 Oct 2006 12:35:53 +0200 From: Phil Pennock To: zsh-users Subject: Re: 24948: max size of an array ? Message-ID: <20061019103553.GA11790@parhelion.globnix.org> Mail-Followup-To: zsh-users References: <453726F7.8030504@ulpmm.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <453726F7.8030504@ulpmm.u-strasbg.fr> Sender: Phil Pennock On 2006-10-19 at 09:19 +0200, Marc Chantreux wrote: > I noticed that the max size of an array is 24948. Is it right ? Is there > a way to work around ? Are you sure that this is the limit of a zsh array and not the limit of what can be passed in argv, given the size of your arguments, to a command via the execve() system call on your OS? % typeset -a mille; mille=() % for ((i=0; i < 100; i+=1)) mille+=($i{0,1,2,3,4,5,6,7,8,9}) % print $#mille 1000 % typeset -a foo; foo=(); for ((i=0; i < 30; i+=1)) foo+=(${i}${mille}) % print $#foo 30000 On my OS, I can use print and /bin/echo just fine with that; if I repeat the foo loop 100 times, so that $#foo is 100000, then I can use the zsh print builtin but if I try to use /bin/echo I get: zsh: argument list too long: /bin/echo Is this the limit you're hitting? Regards, -Phil