Thursday, 22 August 2013

Display files which contains a word on more then three lines?

Display files which contains a word on more then three lines?

I am trying to display all files which contain a specific word on more
then three lines.
i.e. file:
Andrew is so nice,
and Andrew want some ice,
but Andrew doesn't roll the dice.
So this file contains Andrew on more than three lines, so it will be
displayed.
I used grep -or '\' but it list all files which contain "word" on at least
1 line.

No comments:

Post a Comment