Reputation: 836
Hey guys I was just curious to see if someone could help me. I'm trying to search a directory recursively to find a file that has .poem as the extension and contains "I" in it.
when I do
grep -r -e --include *.poem I
I get nothing to show up
Upvotes: 0
Views: 79
Reputation: 2860
To return the filenames only:
grep -r -H "I" yourdir --include *.poem | cut -d: -f1 | uniq -u
Replace yourdir by the directory.
Upvotes: 1