1

I'm looking for any .pro file that contains the string "xxxxx.h"

I tried doing:

grep -Iir "xxxxx.h" . | grep "*.pro"

But that didn't work. Is this even possible with just the grep command? If not, how else would I do it?

TrolliOlli
  • 909
  • 2
  • 10
  • 18

1 Answers1

3

You can use --include option:

grep -Iir --include='*.pro' "xxxxx\.h" .
anubhava
  • 761,203
  • 64
  • 569
  • 643