Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: globbing for links in pathnames
- X-seq: zsh-users 2093
- From: Steve Talley <Stephen.Talley@xxxxxxxxxxxxxxx>
- To: sweth@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: globbing for links in pathnames
- Date: Thu, 4 Feb 1999 17:23:32 -0700 (MST)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- Reply-to: Steve Talley <Stephen.Talley@xxxxxxxxxxxxxxx>
>
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author