in reply to Getting next line after matched one
Note that this also works if you have two (or more) consecutive lines matching PATTERN - it prints all of them except the first, and the line following it. It won't try to read past eof either.perl -ne 'print if $,;$, = /PATTERN/' input
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting next line after matched one
by sgifford (Prior) on Dec 31, 2004 at 17:50 UTC |