Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Excluding files & directories from a glob
- X-seq: zsh-users 9472
- From: Jean Chalard <jean.chalard@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: Excluding files & directories from a glob
- Date: Wed, 5 Oct 2005 12:01:46 +0900
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YyXXgyw7GM6YT9Q+dywB2k/ByQ8BLscubokGxcNlu4zAOhyEUL5FvUsHS1FR9p+VsjG3DUAUpWU5DGWBEML7MCQ9XmhvyPcKYMb6LeSdTqaVq7vcnZMkzY4nUWySn3e+zIMwOz4O+7M/cqjl7QsdrSCePF2sWbFwsY6naIWsRkU=
- In-reply-to: <b5i5k1pqbrp6cibu2bcp16m7gpgq3hb4mr@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <t495k1hltml46t91vsedbah8n6h2knijgg@xxxxxxx> <20051004171438.4165d915.pws@xxxxxxx> <b5i5k1pqbrp6cibu2bcp16m7gpgq3hb4mr@xxxxxxx>
- Reply-to: Jean Chalard <jean.chalard@xxxxxxxxx>
> > grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm)~*((#s)|/)junk*/*(.)
>
> Is the following OK/ (appears 2b?)
>
> grep -i 'host' **/(*.cfm~ctpigeonbot.cfm)~junk*/*
The difference between what Peter posted and this is that this pattern
will only avoid files with a path starting with 'junk' relative to the
current directory.
To make it more concrete, it behaves the same except in the case when
you have a subdirectory called junk not immediately in the directory
you're executing the command in, so any file under a directory
./*/junk*/ would not be ignored.
For example, if you have
./foo
./junkfoo/bar
./qux/junkcorge/garply
Then your pattern will match the third file whereas Peter's one will exclude it.
--
J
"If you wish to leave a record of your call,
please state your messij at the sound of the tone."
Messages sorted by:
Reverse Date,
Date,
Thread,
Author