I have a file "test" with following contents:
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use
option I get only abc and not abc_.
If I use
its still printing abcd.
Code:
cat test
abc
abcd_efg
abc_abc
If I use
Code:
grep -w abc test
If I use
Code:
egrep "abc|abc_" test