From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20924 invoked from network); 4 Feb 2003 18:01:50 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Feb 2003 18:01:50 -0000 Received: (qmail 2536 invoked by alias); 4 Feb 2003 18:01:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5880 Received: (qmail 2528 invoked from network); 4 Feb 2003 18:01:23 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Feb 2003 18:01:23 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.46.181.248] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Feb 2003 18:1:23 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h14I1Pi21176 for zsh-users@sunsite.dk; Tue, 4 Feb 2003 10:01:25 -0800 From: "Bart Schaefer" Message-Id: <1030204180124.ZM21175@candle.brasslantern.com> Date: Tue, 4 Feb 2003 18:01:24 +0000 In-Reply-To: <20030204093812.GC20304@io.com> Comments: In reply to John Buttery "Re: check for existence without full globbing" (Feb 4, 3:38am) References: <20030204032905.15019.qmail@web12308.mail.yahoo.com> <1030204051624.ZM15383@candle.brasslantern.com> <20030204093812.GC20304@io.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh users list Subject: Re: check for existence without full globbing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 4, 3:38am, John Buttery wrote: } } Just out of curiosity, isn't this a problem that's neatly solved with } a utility like find(1)? In this particular instance, I don't know of any way to get find to descend all directories while reporting the name of each directory that contains a plain file matching a certain pattern. I'd be happy to be proved wrong ... but my zsh solution isn't doing that either. However, in the general case the best answer is: Unless efficiency is an overriding concern, use whatever utility you're more familiar with. To use any external utility like `find', you have to fork it and read its output. That's quite a bit of overhead. If you're going to pipe the output off to some other external program, or use the result as arguments to another program, then `find' is fine. If you want to suck the output back into zsh to do string manipulations, it's probably more efficient to use a glob in an array assignment.