Is there a way to make grep output "words" from files that match the search expression?
If I want to find all the instances of, say, "th" in a number of files you do;
grep "th" *
but the output will be something like (bold is by me);
some-text-file : the cat sat on the mat
some-other-text-file : the quick brown fox
yet-another-text-file : i hope this explains it thoroughly
What I want it to output, using the same search, is;
the
the
the
this
thoroughly
Is it possible? Or using another/combination of tools?
Thanks,
Neil