Re: grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, 2007-08-28 at 10:05 -0400, Scott McClanahan wrote:
> Not a CentOS specific question, although I am running grep on CentOS 4.3
> but how would you grep out a series of lines in a file starting at a
> specific point.  For instance, if I have a file named foo and I want to
> grep out the next 5 lines after the first and only instance of the
> string "bar" how could I pull that off?  Thanks so much.

I know I'm late on this and there have been many fine replies. I prefer
csplit for tasks like this. As always with *IX, many ways to skin the
cat.

> <snip>

--
Bill

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux