hello, i have a file that contains a lot of strings.
my goal is to print only words i need.
for example i am searching for part of words ab, cd, ef.
those words might be for example able, abnormal... whatever.
when i use:
Code:
egrep '(ab|cd|ef)' file.txt
it prints whole sentences which contain them but i want get printed only the words, not sentences that contain ab, cd, ef.
how can i do that ?
thanks