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
In reply to Re: Getting next line after matched one
by Anonymous Monk
in thread Getting next line after matched one
by ramthen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |