I am basically grepping with a regular expression on. Now 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 amomunt of data in a line), i would like to get all the words that start with MAIL_
Also the grep command on the shell should 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 am trying
grep -Gril MAIL_* .
grep -Grio MAIL_* .
grep -Gro MAIL_* .
Not sure how to achieve this.
Rgds, AJ