From: Steve Talley <Stephen.Talley@Central.Sun.COM>
To: sweth@astaroth.nit.gwu.edu
Cc: zsh-users@math.gatech.edu
Subject: Re: globbing for links in pathnames
Date: Thu, 4 Feb 1999 17:23:32 -0700 (MST) [thread overview]
Message-ID: <199902050024.RAA17645@empire.Central.Sun.COM> (raw)
>
> On Thu, Feb 04, 1999 at 03:36:10PM -0700, Steve Talley wrote:
> > Question: I am trying to locate all directories called "man" one
> > level deep, ie:
> >
> > % ls pkgs/*/man
> >
> > will do it. The trouble is, some of these are redundant (like
> > zsh-3.1.5/man and zsh/man). Is there a way to only specify the
> > links (or non-links) in the glob? Something like
> >
> > % ls pkgs/*(@)/man
>
> % ls pkgs/**/man(/)
>
> will find _all_ directories named man below the pkgs
> directory, but will _not_ follow symlinks. (to do that, you
> would do `ls pkgs/***/man(/)' instead.) if you want to limit
> your search to man directories one level deep (either so as
> to not list subsequent ones, or to not waste time searching
> large subdirectories that you aren't interested in), you're
> probably better off using find, or some kludge like
>
> % ls $( ls -d test/*(@) )/man(/)
Thanks! This is _almost_ what I want, but the above glob will
only add the last part ("man") to the last element of the list
from the earlier part.
So a general question is: Is there a way to make
(a b c d)/man
expand to
a/man b/man c/man d/man
without using a for... clause?
Thanks,
Steve
next reply other threads:[~1999-02-05 0:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-05 0:23 Steve Talley [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-02-05 17:14 Bart Schaefer
1999-02-05 14:24 Andrew Gallagher
1999-02-05 12:06 Phil Pennock
1999-02-05 5:07 Bart Schaefer
1999-02-05 4:22 Sweth Chandramouli
1999-02-05 4:11 Sweth Chandramouli
1999-02-05 0:56 Bart Schaefer
1999-02-04 23:27 Sweth Chandramouli
1999-02-04 22:36 Steve Talley
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=199902050024.RAA17645@empire.Central.Sun.COM \
--to=stephen.talley@central.sun.com \
--cc=sweth@astaroth.nit.gwu.edu \
--cc=zsh-users@math.gatech.edu \
/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).