in reply to Print next N lines after a pattern is matched.
What exactly are you having trouble with? Just read the file line by line, and when you find the regex, set a counter to N, and then for each line thereafter, print the line if the variable is greater than zero. Then decrement the variable and continue the loop.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |