bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep -r --exclude problem


From: Com MN PG P E B Consultant 3
Subject: grep -r --exclude problem
Date: Thu, 1 Jun 2006 10:52:44 +0200

I would like to do a grep -r, but exclude all files with 
extensions .bak, .~, .sav. I tried a glob pattern

  grep -r --exclude='*.{bak,~,sav}' .....

but this did not work. I also tried a regexp pattern

  grep -r --exclude='\.(bak|~|sav)$' .....

but this didn't work either. In both cases, grep also 
searched in files ending in bak.

Is there a way to do this with grep (2.5.1), or do 
I have to revert to Good Olde 'find' to achieve my
goal?

Ronald




reply via email to

[Prev in Thread] Current Thread [Next in Thread]