Return second line after a pattern match?

From: Ritchie (rclift_at_chcmail.com)
Date: 07/29/03


Date: 29 Jul 2003 12:12:23 -0700

I'm stuck trying to figure this out. Say I have a file with the
results of a command (lets say: svmon -Put 10) which shows the top 10
usage processes. Each of the returned 10 records in the file is
separated by dashes "-----------". How would you guys code a command
which returns the 2nd line after you encounter and match the line of
dashes? Matching the dashes isn't difficult but I can't figure out
how to get the 2nd line after each match.

Thanks - Ritchie



Relevant Pages

  • Re: Return second line after a pattern match?
    ... > usage processes. ... Matching the dashes isn't difficult but I can't figure out ... > Thanks - Ritchie ... -- http://ftp.opensysmon.com is a shell script archive site with an open source system monitoring and network monitoring software package. ...
    (comp.unix.aix)
  • Re: Return second line after a pattern match?
    ... >> I'm stuck trying to figure this out. ... >> usage processes. ... Matching the dashes isn't difficult but I can't figure out ... >use nawk ...
    (comp.unix.aix)