grep with following lines

arnoldh_at_celerent.com
Date: 04/20/05

  • Next message: Padiyath Sreekumaran: "Lost disklabel - How to write new label"
    Date: Wed, 20 Apr 2005 16:45:54 -0400
    To: tru64-unix-managers@ornl.gov
    
    

    Under Tru64 is there a way to grep a file for a match and then once the
    match is found return the line and then get the next 3 lines.

    I found on the web that grep supports a -A num or -B num that supports
    this, but under Tru64 the grep command doesn't know the -A or -B.

    Thanks,

    Howard

    --------------------------------------------------------------------
    mail2web - Check your email from the web at
    http://mail2web.com/ .


  • Next message: Padiyath Sreekumaran: "Lost disklabel - How to write new label"

    Relevant Pages

    • Re: Text search to pull paragraphs from file
      ... > I am familiar with grep. ... >> It would be simpler to put each of the paragraphs in a seperate file ... read num # number of strings you want to search for, up to 3, here ... NUM=`expr $NUM + 1` ...
      (comp.os.linux.misc)
    • Re: How to display n rows before and after grep ?
      ... > with most Linux distributions I can use ... > grep -C ... The easiest way is to install GNU grep, as the -C option is only ... If that is not an option, use an awk script to save the last NUM ...
      (comp.unix.shell)