View Single Post
Old 10-02-2007, 03:17 AM   #2 (permalink)
ShadyCraig
Recruit
 
Join Date: Sep 2005
Location: Loughborough, England, UK
Posts: 12
ShadyCraig is on a distinguished road
Try:
Code:
$ grep -Rl foo ./ | grep -v "CVS/" >> log.txt
l (thats 'ell') just means list the files that match, the second grep then removes anything with CVS in the path or filename but the / means that it should only match paths

grep has a --exclude option but it seems only to work on the filename not the path.

Shady
ShadyCraig is offline   Reply With Quote