Originally posted by: n0cmonkey
grep
find . -exec grep 'myfunction(*)' {} \;
As long as you want to search for myfunction(*) exaclty.![]()
Originally posted by: Jumpem
Originally posted by: n0cmonkey
grep
find . -exec grep 'myfunction(*)' {} \;
As long as you want to search for myfunction(*) exaclty.![]()
I want it to match the function name exactly, but match anything inside the ().
Originally posted by: Nothinman
You can also use egrep (same as grep -E) to match a regular expression.
Originally posted by: Jumpem
Originally posted by: Nothinman
You can also use egrep (same as grep -E) to match a regular expression.
Can you give an example?
Originally posted by: Nothinman
Not to sound too harsh, but if you don't know regular expressions already it'll probably take longer to create one than to search for generic 'functionname' and sort through the dups.
The egrep man page has a small section on regular expressions, but there is also the perlre, perlretut and perlfaq6 man pages that describe regular expressions. There's also an O'Reilly book or two on the subject. They're incredibly useful, especially in perl, but they're also really hard to read.
Originally posted by: Nothinman
That's what find -exec does, it runs the command after exec on every file that find finds.
Originally posted by: Nothinman
And you probably also want to use -type f, so it only runs on real files.