How can I make grep ignore first N matches in a file, then print (N+1)th match and all k lines after it and then exit.
feedback
|
migrated from stackoverflow.com Aug 29 '11 at 7:35
This question came from our site for professional and enthusiast programmers.
|
An alternative solution in
More readably:
Make sure you fill in The first block will keep track of each time the pattern is found. Once that passes the | |||
|
feedback
|
|
Just pipe the result to
| |||||||
feedback
|
|
you can use
First | |||
|
feedback
|