HI
Input :
Counters
Counter
Int
Ints
Counters
Counters
Ints
Ints
I want to grep Counter|Int
Output :
Counter
Int
HI
Input :
Counters
Counter
Int
Ints
Counters
Counters
Ints
Ints
I want to grep Counter|Int
Output :
Counter
Int
I do see blank spaces after those string, so you could do:
grep -E "^Counter[ ]*$|^Int[ ]*$" file