<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Printing a set of lines after a pattern match</title>
	<atom:link href="http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/feed/" rel="self" type="application/rss+xml" />
	<link>http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/</link>
	<description>Blog O' Matty</description>
	<lastBuildDate>Tue, 07 Feb 2012 02:31:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: GP&#62;</title>
		<link>http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/comment-page-1/#comment-298479</link>
		<dc:creator>GP&#62;</dc:creator>
		<pubDate>Sun, 02 Mar 2008 14:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/#comment-298479</guid>
		<description>sed -n &#039;/foo/!d;n;p;n;p&#039; test</description>
		<content:encoded><![CDATA[<p>sed -n &#8216;/foo/!d;n;p;n;p&#8217; test</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rockmelon</title>
		<link>http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/comment-page-1/#comment-156945</link>
		<dc:creator>rockmelon</dc:creator>
		<pubDate>Wed, 12 Dec 2007 04:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/#comment-156945</guid>
		<description>Classic awk for this is:

nawk &#039;NR&lt;=p {print}  /foo/ {p=NR+2}&#039; test</description>
		<content:encoded><![CDATA[<p>Classic awk for this is:</p>
<p>nawk &#8216;NR&lt;=p {print}  /foo/ {p=NR+2}&#8217; test</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernd Eckenfels</title>
		<link>http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/comment-page-1/#comment-148196</link>
		<dc:creator>Bernd Eckenfels</dc:creator>
		<pubDate>Tue, 04 Dec 2007 02:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/#comment-148196</guid>
		<description>In that specific case you can use egrep with -A 2 :) 

However I am also currntly scripting a log file parser which should be able to keep multiple likes of stacktraces (not starting with date) together, and in that case awk or perl is I guess in order.

Gruss
Bernd</description>
		<content:encoded><![CDATA[<p>In that specific case you can use egrep with -A 2 :) </p>
<p>However I am also currntly scripting a log file parser which should be able to keep multiple likes of stacktraces (not starting with date) together, and in that case awk or perl is I guess in order.</p>
<p>Gruss<br />
Bernd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fazal Majid</title>
		<link>http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/comment-page-1/#comment-148195</link>
		<dc:creator>Fazal Majid</dc:creator>
		<pubDate>Tue, 04 Dec 2007 02:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://prefetch.net/blog/index.php/2007/12/03/printing-a-set-of-lines-after-a-pattern-match/#comment-148195</guid>
		<description>Or you could use GNU grep&#039;s --after-context option:
ggrep -A 2 test</description>
		<content:encoded><![CDATA[<p>Or you could use GNU grep&#8217;s &#8211;after-context option:<br />
ggrep -A 2 test</p>
]]></content:encoded>
	</item>
</channel>
</rss>

