3 ms·
-r will grep over a lot of files you don't want it to. A lot of times if my dir structure is not very complicated, I'll grep like this: grep smth [star].{cpp,
by georgecmu 17y ago
-r will grep over a lot of files you don't want it to.
A lot of times if my dir structure is not very complicated, I'll grep like this:
grep smth [star].{cpp,h} [star]/[star].{cpp,h} [star]/[star]/[star].{cpp,h}
but these stars get annoying very quickly.
- scrame 17y agozsh has a double-splat operator. You can just do [star][star]/[star].{cpp,h} and it will do a recursive match.