From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18057 invoked from network); 24 Mar 2002 00:13:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Mar 2002 00:13:10 -0000 Received: (qmail 25344 invoked by alias); 24 Mar 2002 00:12:53 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4769 Received: (qmail 25296 invoked from network); 24 Mar 2002 00:12:52 -0000 Date: Sun, 24 Mar 2002 01:12:49 +0100 From: Sven Guckes To: zsh-users@sunsite.dk Subject: Re: var expansion in glob pattern? - s/end/done/ ! Message-ID: <20020324001249.GA12484@ritz.math.fu-berlin.de> References: <20020323185649.GA12320@ritz.math.fu-berlin.de> <1020323193618.ZM28746@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1020323193618.ZM28746@candle.brasslantern.com> User-Agent: Mutt/1.3.27i X-Virus-Scanned: by AMaViS perl-11 (NAI-uvscan@math.fu-berlin.de) * Bart Schaefer [2002-03-23 19:36]: > On Mar 23, 7:56pm, Sven Guckes wrote: > } $ for i in 1 2 3 4 5 10 15 20 25 30 35 40 35 40 45 50; do > } ls *(.Lk-$i)|wc -l > } end > } zsh: parse error near `end' > > You need "done" rather than "end", there. $ for i in 1 2 3 4 5 10 15 20 25 30 35 40 35 40 45 50; do ls *(.Lk-$i)|wc -l done 9 211 642 1298 2015 3331 3882 4188 4365 4493 4595 4670 4595 4670 4716 4757 now it works! :-) > There's nothing wrong with the glob expression -- > except that passing it as the argument to "ls" may do > the wrong thing when there are no matches at all. good point! > Of course note that the files smaller than 50k > includes all the files smaller than 45k, and so on ... yep, that's a feature. :-) Sven