I have looked through a number of question but they do not satisfactorily reply to my question.
I need to print words that match the pattern exactly not the lines containing that word. For example:
I am going home. Home is where heart is.
So when I search with pattern "home", I should get
I understand that
grep -o will make my task easier, but my
grep does not support that option. So I need some other solution.
Also I need an exact match. So that if there is a word
homeless it should not be picked in selection.