I have this command which works great
find . -type f -name *.txt -exec grep -li blah {} \;
Let's say the output will be:
/tmp/folder1/file1.txt
/tmp/folder2/myfile.txt
/tmp/thisfile.txt
If I was to do this:
find . -type f -name *.txt -exec grep -li -E --color blah {} \;
this would highlight the entire string. So /tmp/folder1/file1.txt would be highlighted.
Can I get it to highlight only the filename? So file1.txt, myfile.txt, thisfile.txt will be highlighted and nothing else.
Is this even possible?