<?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: Reading Standard Input in a Bash Shell Script</title>
	<atom:link href="http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/</link>
	<description>I'm a biologist not a...</description>
	<lastBuildDate>Sat, 13 Mar 2010 11:21:08 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cool</title>
		<link>http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/comment-page-1/#comment-86670</link>
		<dc:creator>cool</dc:creator>
		<pubDate>Wed, 22 Oct 2008 22:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/uncategorized/reading-standard-input-in-a-bash-shell-script/#comment-86670</guid>
		<description>Thanks to you I was able to use my google-fu and find the answer right away.

I&#039;m going to change my script so that if $1 is &quot;&quot; 
# ($1 is the first argument passed to the script)
then it reads from /dev/stdin

That should let me cat up a bunch of logfiles and send them all to my parser without saving them as a file first.</description>
		<content:encoded><![CDATA[<p>Thanks to you I was able to use my google-fu and find the answer right away.</p>
<p>I&#8217;m going to change my script so that if $1 is &#8220;&#8221;<br />
# ($1 is the first argument passed to the script)<br />
then it reads from /dev/stdin</p>
<p>That should let me cat up a bunch of logfiles and send them all to my parser without saving them as a file first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: firebush</title>
		<link>http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/comment-page-1/#comment-58293</link>
		<dc:creator>firebush</dc:creator>
		<pubDate>Sat, 28 Jun 2008 15:24:45 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/uncategorized/reading-standard-input-in-a-bash-shell-script/#comment-58293</guid>
		<description>Thanks, this was helpful.</description>
		<content:encoded><![CDATA[<p>Thanks, this was helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ScottS-M</title>
		<link>http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/comment-page-1/#comment-3969</link>
		<dc:creator>ScottS-M</dc:creator>
		<pubDate>Mon, 11 Jun 2007 14:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/uncategorized/reading-standard-input-in-a-bash-shell-script/#comment-3969</guid>
		<description>That&#039;s true. I tend to be lazy and just call bash explicitly instead of using chmod and adding  &lt;code&gt;#!/bin/bash&lt;/code&gt; to the first line of the script.</description>
		<content:encoded><![CDATA[<p>That&#8217;s true. I tend to be lazy and just call bash explicitly instead of using chmod and adding  <code>#!/bin/bash</code> to the first line of the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://scott.sherrillmix.com/blog/programmer/reading-standard-input-in-a-bash-shell-script/comment-page-1/#comment-3968</link>
		<dc:creator>J</dc:creator>
		<pubDate>Mon, 11 Jun 2007 13:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://scott.sherrillmix.com/blog/uncategorized/reading-standard-input-in-a-bash-shell-script/#comment-3968</guid>
		<description>It&#039;s unnecessary to call &quot;bash myscript.bash&quot;

Set your script executable:
chmod +x myscript.bash

and then run it as:
cat sourcefile.txt &#124; ./myscript.bash</description>
		<content:encoded><![CDATA[<p>It&#8217;s unnecessary to call &#8220;bash myscript.bash&#8221;</p>
<p>Set your script executable:<br />
chmod +x myscript.bash</p>
<p>and then run it as:<br />
cat sourcefile.txt | ./myscript.bash</p>
]]></content:encoded>
	</item>
</channel>
</rss>
