Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Excluding files & directories from a glob



Peter Stephenson <pws@xxxxxxx> writes:

> zzapper <david@xxxxxxxxxx> wrote:
...
>> grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm)
>> 
>> But I would like it to also ignore sub-directories named junk*
>
> With extendedglob, the following should work:
>
>   grep -i 'host' **/(*.cfm~(ctpigeonbot|env).cfm)~*((#s)|/)junk*/*(.)

Wouldn't this

grep -i 'host' (^junk*/)#*.cfm~(ctpigeonbot|env).cfm

be a simpler way?

-- 
Hannu



Messages sorted by: Reverse Date, Date, Thread, Author