http://www.perlmonks.org?node_id=1005600


in reply to Re^5: How to print the lines immediately above and below a matching line?
in thread How to print the lines immediately above and below a matching line?

Unless I'm mistaken, the Solaris grep doesn't support -B -A or -C and there's no native grep on Windows.

I don't see how that is relevant, gnu grep supports it and is available for every platform, including solaris and windows

Also, ack is egrep

  • Comment on Re^6: How to print the lines immediately above and below a matching line?

Replies are listed 'Best First'.
Re^7: How to print the lines immediately above and below a matching line?
by Kenosis (Priest) on Nov 26, 2012 at 16:56 UTC

    I don't see how that is relevant, gnu grep supports it and is available for every platform, including solaris and windows

    Also, ack is egrep

    This topic is Bio90's very first request for assistance at PerlMonks. Wouldn't it have been more helpful to have just directly offered grep as a better solution?

      This topic is Bio90's very first request for assistance at PerlMonks. Wouldn't it have been more helpful to have just directly offered grep as a better solution?

      Why?