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
  • 827
  • 2
  • 8
  • 18

1 Answers1

3

You can use --include option:

grep -Iir --include='*.pro' "xxxxx\.h" .
anubhava
  • 713,503
  • 59
  • 514
  • 593