Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Pruning Recursive Glob
- X-seq: zsh-users 13757
- From: Chris Johnson <cjohnson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Pruning Recursive Glob
- Date: Mon, 26 Jan 2009 09:53:29 -0500
- In-reply-to: <200901261416.n0QEG1B3031727@xxxxxxxxxxxxxx> <237967ef0901260615t42bd8443oeba97554f1e1dd7@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090126141155.GA26716@namib> <200901261416.n0QEG1B3031727@xxxxxxxxxxxxxx> <20090126141155.GA26716@namib> <237967ef0901260615t42bd8443oeba97554f1e1dd7@xxxxxxxxxxxxxx>
Mikael Magnusson sent me the following 0.7K:
> > For example, I'd like to issue something like
> >
> > $ cd WWW/checkout
> > $ chmod a+rX **/*~CVS
> >
> > to make all non-CVS files readable and all non-CVS directories readable
> > and executable. But that ~CVS doesn't do any pruning. Nor does ~*/CVS,
> > ~**/CVS, etc.
> >
> > Is what I'm trying to do supported by some globbing pattern?
>
> **/*~*/CVS should work, do you have setopt extendedglob in effect?
Peter Stephenson sent me the following 0.9K:
> (^CVS/)#^CVS
>
> This requires EXTENDED_GLOB, unlike the basic "**" syntax.
Ah, I was using ls to test Mikael's suggestion, and it was expanding the
directories, so I was seeing CVS directories though they weren't being
matched. I needed:
$ ls -d **/*~*/CVS
However, though this omits the CVS directories themselves, it does
generate CVS/Entries and so on. Peter's pattern seems to work great.
Thanks!
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author