<?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: HowTo: Read a File Line By Line Using awk</title> <atom:link href="http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/</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: Ed Dagos</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63113</link> <dc:creator>Ed Dagos</dc:creator> <pubDate>Mon, 03 Oct 2011 20:48:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63113</guid> <description>Thanks Vivek for your response. However, on Sun OS 5.10 Options -B and -A do not work. Would you mind to tell me what environment have you tested it.
Regards,
Ed</description> <content:encoded><![CDATA[<p>Thanks Vivek for your response. However, on Sun OS 5.10 Options -B and -A do not work. Would you mind to tell me what environment have you tested it.<br
/> Regards,<br
/> Ed</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63053</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Sat, 01 Oct 2011 20:21:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63053</guid> <description>Search for &quot;foo&quot; in data.txt and display  3  lines  of  leading  context  &lt;strong&gt;before&lt;/strong&gt;  matching  line:
&lt;pre&gt;grep -B3 &quot;foo&quot; data.txt&lt;/pre&gt;
The -A  options display $NUM  lines  of  trailing  context  &lt;strong&gt;after&lt;/strong&gt;  matching lines:
&lt;pre&gt;grep -A3 &quot;foo&quot; data.txt&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>Search for &#8220;foo&#8221; in data.txt and display  3  lines  of  leading  context <strong>before</strong> matching  line:</p><pre>grep -B3 "foo" data.txt</pre><p>The -A  options display $NUM  lines  of  trailing  context <strong>after</strong> matching lines:</p><pre>grep -A3 "foo" data.txt</pre>]]></content:encoded> </item> <item><title>By: Trupti</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63052</link> <dc:creator>Trupti</dc:creator> <pubDate>Sat, 01 Oct 2011 17:46:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-63052</guid> <description>Exactl, even I wanted to know the same. If anyone could help me with this. :)
Ed Dagos September 16, 2011
Hi All,
Is it possible to find a pattern in the file and then print the previous 3 or 4 lines using awk/sed/grep ??
Regards,</description> <content:encoded><![CDATA[<p>Exactl, even I wanted to know the same. If anyone could help me with this. :)</p><p>Ed Dagos September 16, 2011</p><p> Hi All,<br
/> Is it possible to find a pattern in the file and then print the previous 3 or 4 lines using awk/sed/grep ??<br
/> Regards,</p> ]]></content:encoded> </item> <item><title>By: Ed Dagos</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-62464</link> <dc:creator>Ed Dagos</dc:creator> <pubDate>Fri, 16 Sep 2011 01:26:25 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-62464</guid> <description>Hi All,
Is it possible to find a pattern in the file and then print the previous 3 or 4 lines using awk/sed/grep ??
Regards,
Ed</description> <content:encoded><![CDATA[<p>Hi All,<br
/> Is it possible to find a pattern in the file and then print the previous 3 or 4 lines using awk/sed/grep ??<br
/> Regards,<br
/> Ed</p> ]]></content:encoded> </item> <item><title>By: varpal</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-49772</link> <dc:creator>varpal</dc:creator> <pubDate>Tue, 28 Sep 2010 10:35:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-49772</guid> <description>Can I compare two column in AWK</description> <content:encoded><![CDATA[<p>Can I compare two column in AWK</p> ]]></content:encoded> </item> <item><title>By: andre</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-45633</link> <dc:creator>andre</dc:creator> <pubDate>Tue, 19 Jan 2010 22:33:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-45633</guid> <description>Hi great article.  One suggestion is that the file  names in the awk scripts can be substituted for the standard input.
e.g.   to get the number of lines in a file you could use
wc -l filename &#124;  awk &#039;{ print $1 }&#039;
Andre</description> <content:encoded><![CDATA[<p>Hi great article.  One suggestion is that the file  names in the awk scripts can be substituted for the standard input.</p><p>e.g.   to get the number of lines in a file you could use</p><p>wc -l filename |  awk &#8216;{ print $1 }&#8217;</p><p>Andre</p> ]]></content:encoded> </item> <item><title>By: sundar</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-42250</link> <dc:creator>sundar</dc:creator> <pubDate>Fri, 26 Jun 2009 02:34:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-42250</guid> <description>That&#039;s a good tip! By the way, how to read a file, compare a field value then &lt;b&gt;insert &lt;/b&gt;record in between using awk? Can you help? Thanks. :-)</description> <content:encoded><![CDATA[<p>That&#8217;s a good tip! By the way, how to read a file, compare a field value then <b>insert </b>record in between using awk? Can you help? Thanks. :-)</p> ]]></content:encoded> </item> <item><title>By: TrueColorTech</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-41866</link> <dc:creator>TrueColorTech</dc:creator> <pubDate>Mon, 01 Jun 2009 16:08:53 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-41866</guid> <description>Thanks for the tip, made things much easier.</description> <content:encoded><![CDATA[<p>Thanks for the tip, made things much easier.</p> ]]></content:encoded> </item> <item><title>By: codeguru</title><link>http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-40492</link> <dc:creator>codeguru</dc:creator> <pubDate>Thu, 26 Feb 2009 06:46:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/read-a-file-line-by-line-using-awk/#comment-40492</guid> <description>That was pretty cool. Had problems understanding awk. The tip really enlightened me. Thanks</description> <content:encoded><![CDATA[<p>That was pretty cool. Had problems understanding awk. The tip really enlightened me. Thanks</p> ]]></content:encoded> </item> </channel> </rss>
