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, I
You could pipe your grep output into Perl like this:
grep "th" * | perl -n -e'while(/(\w*th\w*)/g) {print "$1\n"}'