I know that I can use grep
to search for a string. But what if I want the output to show only lines where the string I search for occurred more than once? I prefer grep
.
To clarify, I need to print the lines where the keyword appears more than once (i.e. two or above, or at least two). But I do not mean the lines that have exactly two.