From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: check for existence without full globbing
Date: Tue, 4 Feb 2003 18:01:24 +0000 [thread overview]
Message-ID: <1030204180124.ZM21175@candle.brasslantern.com> (raw)
In-Reply-To: <20030204093812.GC20304@io.com>
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.
prev parent reply other threads:[~2003-02-04 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-03 21:24 Le Wang
2003-02-04 2:49 ` Bart Schaefer
2003-02-04 3:29 ` Le Wang
2003-02-04 5:16 ` Bart Schaefer
2003-02-04 9:38 ` John Buttery
2003-02-04 18:01 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1030204180124.ZM21175@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).