Grep: show me this line and the next N lines?

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



Can grep show the matching lines and the next N lines after a match?
For instance, I have a config file wit hthe following text:
[Tag h1]
foreground=#2e5a03
underline=double
indent=0
weight=PANGO_WEIGHT_BOLD
scale=2.25

I would ideally grep on "[Tag h1]" and have grep display the match and
the next 5 lines so that I see all the content of the h1 section.

Can this be done?

Thanks!

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
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