<?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: read a file with bash</title>
	<atom:link href="http://anton.lr2.com/2005/03/23/read-a-file-with-bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/</link>
	<description>Just another LR2 Blogs weblog</description>
	<lastBuildDate>Fri, 21 Nov 2008 21:46:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-248</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 31 Oct 2008 13:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-248</guid>
		<description>/tmp/file with space.txt is listed above and it has more than one whitespace.</description>
		<content:encoded><![CDATA[<p>/tmp/file with space.txt is listed above and it has more than one whitespace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michelek</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-247</link>
		<dc:creator>michelek</dc:creator>
		<pubDate>Thu, 30 Oct 2008 11:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-247</guid>
		<description>hi,
what if file names with more than one whitespace are listed?

m</description>
		<content:encoded><![CDATA[<p>hi,<br />
what if file names with more than one whitespace are listed?</p>
<p>m</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RJ</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-56</link>
		<dc:creator>RJ</dc:creator>
		<pubDate>Wed, 14 Mar 2007 18:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-56</guid>
		<description>Anton,
Love the tutorial, great stuff and very helpful. I do have a question however. Suppose I am wanting to read specific contents within a text file like name, address, phone, etc... and put it into another file to archive. How do I read the file using Bash and make it look for keywords to recognize what I need it to read? (hope that makes sense)  =)</description>
		<content:encoded><![CDATA[<p>Anton,<br />
Love the tutorial, great stuff and very helpful. I do have a question however. Suppose I am wanting to read specific contents within a text file like name, address, phone, etc&#8230; and put it into another file to archive. How do I read the file using Bash and make it look for keywords to recognize what I need it to read? (hope that makes sense)  =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-57</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Thu, 01 Mar 2007 19:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-57</guid>
		<description>Ted,

If you get the 4% in a var, then you could always just split in on %, take the first part, and use a regular if to handle it.

X=$(curl -s -o - http://www.random.org/cgi-bin/checkbuf)
if [ &quot;${X%\%*}&quot; -get 10 ] ; then
   echo &quot;X is more than 10%!&quot;
fi</description>
		<content:encoded><![CDATA[<p>Ted,</p>
<p>If you get the 4% in a var, then you could always just split in on %, take the first part, and use a regular if to handle it.</p>
<p>X=$(curl -s -o &#8211; <a href="http://www.random.org/cgi-bin/checkbuf)" rel="nofollow">http://www.random.org/cgi-bin/checkbuf)</a><br />
if [ "${X%\%*}" -get 10 ] ; then<br />
   echo &#8220;X is more than 10%!&#8221;<br />
fi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Rolle</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-55</link>
		<dc:creator>Ted Rolle</dc:creator>
		<pubDate>Fri, 23 Feb 2007 22:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-55</guid>
		<description>I&#039;m accessing &#039;http://www.random.org/cgi-bin/checkbuf&#039;
It returns the single-line file &#039;checkbuf&#039; with these contents&quot;
4%
In this case I wouldn&#039;t want to request a number of random bytes.
How do I check the number (note it&#039;s 4%, not 004%) and do the Right Thing?

Ted</description>
		<content:encoded><![CDATA[<p>I&#8217;m accessing &#8216;http://www.random.org/cgi-bin/checkbuf&#8217;<br />
It returns the single-line file &#8216;checkbuf&#8217; with these contents&#8221;<br />
4%<br />
In this case I wouldn&#8217;t want to request a number of random bytes.<br />
How do I check the number (note it&#8217;s 4%, not 004%) and do the Right Thing?</p>
<p>Ted</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-54</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 23 Feb 2007 05:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-54</guid>
		<description>Great help.  Thanks!</description>
		<content:encoded><![CDATA[<p>Great help.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phillip</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-53</link>
		<dc:creator>phillip</dc:creator>
		<pubDate>Wed, 21 Feb 2007 23:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-53</guid>
		<description>hey anton,

hope all is well, i have a question that i am sure you can answer in a heartbeat... i have a command that is returning two lines, essentially, i want to take each of those lines and make a variable out of them, how do i do that with bash? ;)</description>
		<content:encoded><![CDATA[<p>hey anton,</p>
<p>hope all is well, i have a question that i am sure you can answer in a heartbeat&#8230; i have a command that is returning two lines, essentially, i want to take each of those lines and make a variable out of them, how do i do that with bash? <img src='http://anton.lr2.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-52</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Thu, 01 Feb 2007 07:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-52</guid>
		<description>Hi Anton,

The piece of code on this page helped me in a lot of ways.
Thanks a lot.

Praveen</description>
		<content:encoded><![CDATA[<p>Hi Anton,</p>
<p>The piece of code on this page helped me in a lot of ways.<br />
Thanks a lot.</p>
<p>Praveen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-51</link>
		<dc:creator>Curtis</dc:creator>
		<pubDate>Tue, 23 Jan 2007 13:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-51</guid>
		<description>Hi Anton:

I&#039;m usually always on windows, but today, I got a shell account from a friend, and although I knew bits and pieces about *nix and shell scripting because of being a web dev, you really helped point me in the right direction here.

Thanks,
Curtis</description>
		<content:encoded><![CDATA[<p>Hi Anton:</p>
<p>I&#8217;m usually always on windows, but today, I got a shell account from a friend, and although I knew bits and pieces about *nix and shell scripting because of being a web dev, you really helped point me in the right direction here.</p>
<p>Thanks,<br />
Curtis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://anton.lr2.com/2005/03/23/read-a-file-with-bash/comment-page-1/#comment-50</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 22 Jan 2007 11:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://anton.lr2.com/archives/2005/03/23/read-a-file-with-bash/#comment-50</guid>
		<description>Thanks, just what I needed.</description>
		<content:encoded><![CDATA[<p>Thanks, just what I needed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
