From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27587 invoked from network); 19 Mar 2004 16:34:46 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Mar 2004 16:34:46 -0000 Received: (qmail 29926 invoked by alias); 19 Mar 2004 16:34:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7199 Received: (qmail 29917 invoked from network); 19 Mar 2004 16:34:28 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Mar 2004 16:34:28 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [199.67.51.101] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Mar 2004 16:34:27 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i2JGYPSh037152; Fri, 19 Mar 2004 10:34:25 -0600 (CST) (envelope-from dan) Date: Fri, 19 Mar 2004 10:34:25 -0600 From: Dan Nelson To: Clint Adams , Zsh Users Subject: Re: How to generate a list of numbers without 'seq'? Message-ID: <20040319163425.GF99558@dan.emsphone.com> References: <20040318205201.GA1228@DervishD> <20040318211223.GA1543@scowler.net> <20040319095840.GD1228@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040319095840.GD1228@DervishD> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i In the last episode (Mar 19), DervishD said: > Hi Clint :) > > * Clint Adams dixit: > > > print -l `seq 0 10` > > > entirely using Zsh. How can I replace the 'seq'??? > > 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; {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. -- Dan Nelson dnelson@allantgroup.com