The blog has moved to http://jessehouse.com/ ... Many google searches point here so I am leaving it operational, but there will be no new posts.

Thursday, March 11, 2010

exclude .svn results with egrep recursive search

The exclude-dir option works nicely, I was previously was using --exclude and it would include some sub-dir .svn files
egrep --exclude-dir=\.svn -r -n {search-criteria} {directory}
i.e. find all TODO comments in the current directory and all sub directories
egrep --exclude-dir=\.svn -r -n TODO .

Found this in the comments on this post - http://antoniolorusso.com/2008/05/12/grep-excluding-svn-dirs/

.

No comments: