<?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: Awk Print Line After A Matching /regex/</title> <atom:link href="http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: royi</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-66473</link> <dc:creator>royi</dc:creator> <pubDate>Sat, 07 Jan 2012 00:15:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-66473</guid> <description>awk -F &quot;=&quot; &#039;{if ($1 like &quot;abc&quot;) print $2 }&#039;</description> <content:encoded><![CDATA[<p>awk -F &#8220;=&#8221; &#8216;{if ($1 like &#8220;abc&#8221;) print $2 }&#8217;</p> ]]></content:encoded> </item> <item><title>By: paddu</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-60382</link> <dc:creator>paddu</dc:creator> <pubDate>Fri, 01 Jul 2011 11:30:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-60382</guid> <description>I have a line abc=xyz
i want to find a pattern &quot;abc=&quot; and if exist print xyz
can some one please help</description> <content:encoded><![CDATA[<p>I have a line abc=xyz<br
/> i want to find a pattern &#8220;abc=&#8221; and if exist print xyz<br
/> can some one please help</p> ]]></content:encoded> </item> <item><title>By: Ajay</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41962</link> <dc:creator>Ajay</dc:creator> <pubDate>Mon, 08 Jun 2009 03:12:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41962</guid> <description>You can us grep as well:
whois bbc.co.uk &#124; grep -A 1 Registrar&#124; grep -v Registrar</description> <content:encoded><![CDATA[<p>You can us grep as well:<br
/> whois bbc.co.uk | grep -A 1 Registrar| grep -v Registrar</p> ]]></content:encoded> </item> <item><title>By: nyxx</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41637</link> <dc:creator>nyxx</dc:creator> <pubDate>Sat, 16 May 2009 18:26:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41637</guid> <description>Reducing awk code for a while we&#039;ll get tha same
&lt;code&gt;$ whois bbc.co.uk &#124; awk -F: &#039;/Registrar:/ { getline; print }&#039;
British Broadcasting Corporation [Tag = BBC]&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Reducing awk code for a while we&#8217;ll get tha same<br
/> <code>$ whois bbc.co.uk | awk -F: '/Registrar:/ { getline; print }'<br
/> British Broadcasting Corporation [Tag = BBC]</code></p> ]]></content:encoded> </item> <item><title>By: Julio A. Cartaya</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41632</link> <dc:creator>Julio A. Cartaya</dc:creator> <pubDate>Sat, 16 May 2009 10:17:43 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41632</guid> <description>Simply saying:
$ awk &#039;/regexp/&#039; /pathto/file
will do the trick: the default action in awk &lt;i&gt;is&lt;/i&gt; printing.</description> <content:encoded><![CDATA[<p>Simply saying:<br
/> $ awk &#8216;/regexp/&#8217; /pathto/file<br
/> will do the trick: the default action in awk <i>is</i> printing.</p> ]]></content:encoded> </item> <item><title>By: GByte</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41606</link> <dc:creator>GByte</dc:creator> <pubDate>Thu, 14 May 2009 09:15:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41606</guid> <description>How about:
$pgrep -A 1 regexp &#124; tail -n 1
?</description> <content:encoded><![CDATA[<p>How about:<br
/> $pgrep -A 1 regexp | tail -n 1<br
/> ?</p> ]]></content:encoded> </item> <item><title>By: Nikhil</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41605</link> <dc:creator>Nikhil</dc:creator> <pubDate>Thu, 14 May 2009 09:06:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41605</guid> <description>$0 != &quot;&quot; looks like a redundant check since it is still the line matching the regex and not the next line.</description> <content:encoded><![CDATA[<p>$0 != &#8220;&#8221; looks like a redundant check since it is still the line matching the regex and not the next line.</p> ]]></content:encoded> </item> <item><title>By: Hai Vu</title><link>http://www.cyberciti.biz/faq/awk-print-line-after-a-matching-regex/#comment-41593</link> <dc:creator>Hai Vu</dc:creator> <pubDate>Wed, 13 May 2009 16:03:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3787#comment-41593</guid> <description>I suggest to use print instead of print $0: it is shorter.</description> <content:encoded><![CDATA[<p>I suggest to use print instead of print $0: it is shorter.</p> ]]></content:encoded> </item> </channel> </rss>
