I am basically grepping with a regular expression on. In the output, I would like to see only the strings that match my reg exp.
In a bunch of XML files (mostly they are single-line files with huge amounts of data in a line), I would like to get all the words that start with MAIL_.
Also, I would like the grep command on the shell to give only the words that matched and not the entire line (which is the entire file in this case).
How do I do this?
I have tried
grep -Gril MAIL_* .
grep -Grio MAIL_* .
grep -Gro MAIL_* .