From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 692 invoked from network); 14 Oct 2005 18:44:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Oct 2005 18:44:44 -0000 Received: (qmail 3006 invoked from network); 14 Oct 2005 18:44:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Oct 2005 18:44:37 -0000 Received: (qmail 26353 invoked by alias); 14 Oct 2005 18:44:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9498 Received: (qmail 26344 invoked from network); 14 Oct 2005 18:44:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Oct 2005 18:44:27 -0000 Received: (qmail 1935 invoked from network); 14 Oct 2005 18:44:27 -0000 Received: from her-isrv.ionific.com (195.197.252.67) by a.mx.sunsite.dk with SMTP; 14 Oct 2005 18:44:26 -0000 Received: from her-gw.ionific.com ([195.197.252.66] helo=trews52.bothi.fi) by her-isrv.ionific.com with esmtp (Exim 3.35 #1 (Debian)) id 1EQUX3-0000vm-00; Fri, 14 Oct 2005 21:43:53 +0300 Received: from azure by trews52.bothi.fi with local (Exim 3.36 #1 (Debian)) id 1EQUWu-00076Z-00; Fri, 14 Oct 2005 21:43:44 +0300 To: Peter Stephenson Cc: zzapper , zsh-users@sunsite.dk Subject: Re: Excluding files & directories from a glob Mail-copies-to: nobody From: Hannu Koivisto Date: Fri, 14 Oct 2005 21:43:34 +0300 In-Reply-To: <20051004171438.4165d915.pws@csr.com> (Peter Stephenson's message of "Tue, 4 Oct 2005 17:14:38 +0100") Message-ID: <87oe5sym5l.fsf@trews52.bothi.fi> User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.4 (i386-pc-linux-gnu) References: <20051004171438.4165d915.pws@csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Hannu Koivisto X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 Peter Stephenson writes: > zzapper wrote: ... >> grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm) >> >> But I would like it to also ignore sub-directories named junk* > > With extendedglob, the following should work: > > grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm)~*((#s)|/)junk*/*(.) Wouldn't this grep -i 'host' (^junk*/)#*.cfm~(ctpigeonbot|env).cfm be a simpler way? -- Hannu