in reply to how do i get the 2nd line when the 1st is matched

Since you are impatient (in the chatterbox), here is a quicky way:

while( <> ) { if( /\Qsid=167216582&ID=1­16\E/ ) { my $nextLine= <>; print $nextLine; } }

A bit shy on details, just like your question. (:

- tye        

Replies are listed 'Best First'.
Re^2: how do i get the 2nd line when the 1st is matched (even quickier)
by ysth (Canon) on Aug 17, 2004 at 06:45 UTC
    $ egrep -A1 some-pattern in-files|grep -v '<option'