I am trying to figure out how to search for "_iterator_tag" string in all sub directories recursively and in files with extensions .cpp, .h, .hpp, .cxx, .inl for now all I can do is search each of these file types separately as below grep -R "_iterator_tag" --include '*.cpp' Is there a quicker way to search all of these file types together? Thank you
|
feedback
|
|
use ack. It's great for searching source code (and not looking in images, or RCS artifacts, like .svn directories) | |||
|
feedback
|
|
You can specify multiple instances of Edit: Specifically
| |||
|
feedback
|
|
try
| ||||
|
feedback
|
|
I define the following aliases in my .bashrc
So I'd typically do:
Of course you'd need a different set of file types. | |||
|
feedback
|