[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: grep -r --exclude problem
From: |
Com MN PG P E B Consultant 3 |
Subject: |
RE: grep -r --exclude problem |
Date: |
Thu, 1 Jun 2006 11:42:32 +0200 |
> From: Ralf Wildenhues [mailto:address@hidden
> * Com MN PG P E B Consultant 3 wrote on Thu, Jun 01, 2006 at
> 10:52:44AM CEST:> > I would like to do a grep -r, but exclude all
files with
> > extensions .bak, .~, .sav.
>
> Try --exclude='*.bak' --exclude='*.~' --exclude='*.sav'.
> From: Andreas Schwab [mailto:address@hidden
> Use multiple --exclude options.
Thank you, this works!
But I think it would be a good idea if grep would include bash-style,
{...}-globbing,
into its include/exclude options, because denoting all the pattern
combination
via multiple --exclude soon gets tiresome. Rewriting a pattern such as
--exclude='{fh,px,gz}_*.{h,cc,cpp}'
into multiple excludes would already require 9 --exclude options -
really a nightmare!
Ronald
- grep -r --exclude problem, Com MN PG P E B Consultant 3, 2006/06/01
- RE: grep -r --exclude problem,
Com MN PG P E B Consultant 3 <=