From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3531 invoked from network); 20 Mar 2004 09:59:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Mar 2004 09:59:58 -0000 Received: (qmail 7405 invoked by alias); 20 Mar 2004 09:59:45 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7202 Received: (qmail 7392 invoked from network); 20 Mar 2004 09:59:45 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Mar 2004 09:59:45 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.193.203.32] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Mar 2004 9:59:45 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i2K9xYk32727; Sat, 20 Mar 2004 10:59:34 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1B4dGq-00004v-00>; Sat, 20 Mar 2004 11:00:00 +0100 Date: Sat, 20 Mar 2004 11:00:00 +0100 From: DervishD To: Dan Nelson Cc: Clint Adams , Zsh Users Subject: Re: How to generate a list of numbers without 'seq'? Message-ID: <20040320100000.GA302@DervishD> Mail-Followup-To: Dan Nelson , Clint Adams , Zsh Users References: <20040318205201.GA1228@DervishD> <20040318211223.GA1543@scowler.net> <20040319095840.GD1228@DervishD> <20040319163425.GF99558@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040319163425.GF99558@dan.emsphone.com> User-Agent: Mutt/1.4.2.1i Organization: Pleyades Hi Dan :) * Dan Nelson dixit: > > > print -l {0..10} > > This is more similar to the solution I was trying using , > > which doesn't seem to work if it cannot be expanded :( But IIRC, I've > > used syntax to generate list of numbers, but I don't remember > > how, when, etc. > is pattern matching, so it only matches existing filenames; Is there a way of making it work in string environment or something like that (a mechanism similar to the use of globbing flags in pattern matching at parameter expansion)? > {x..y} is parameter expansion so it generates its own values. If > you have a LOT of numbers you want to generate, {x..y} will suck up > memory, so incrementing and printing a counter variable in a loop > is better. So for general use, when you don't know in advance how many numbers you want to generate, is better to use the variable in a loop. Thanks for the information :)) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/