grep for a few lines
September 15th, 2006 mysurface Posted in grep, Text Manipulation | Hits: 8953 | 1 Comment »
One of the useful option for grep, when you find the keyword you are searching, instead of return a particular line that contains the keyword, it allows you to specified how many lines to return by specified -A option.
Let say I want to return 5 lines when i found “main” at hello.c.
grep -A 5 main hello.c







April 10th, 2013 at 11:33 am
Usually I do not post on blogs, but I want to say that this write-up very forced me to do so! Thanks, extremely nice article.