I tried something like:
But it hung on a text file???grep -e TEST_ME | find .*
Anyone?
Moderator: General Moderators
But it hung on a text file???grep -e TEST_ME | find .*
Hmmm, you've over complicated it ...Hockey wrote:I need to search files for a static string 'TEST_ME' and I need it to be recusrsive...
I tried something like:
But it hung on a text file???grep -e TEST_ME | find .*
Anyone?
Code: Select all
grep -r TEST_ME .Execute within directory from which on you want to grep recursively.Hockey wrote:I need to search files for a static string 'TEST_ME' and I need it to be recusrsive...
Code: Select all
grep -nr 'TEST_ME' ./* | grep -v '\/\.svn'
#- n will give you line number where match in the file appears
#- i add it for case insensitive
#- r recursive
#- grep -v '\/\.svn' if searching within subversion..to skip svn data.You want to perform a grep on all files in "this" directory and its subdirs?I tried something like:
But it hung on a text file???grep -e TEST_ME | find .*
Code: Select all
find . -exec grep TEST_ME \{\} \;is much simplerJenk wrote:egrep -r TEST_ME