<?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: Bash Scripting Techniques</title>
	<atom:link href="http://www.thelinuxblog.com/bash-scripting-techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thelinuxblog.com/bash-scripting-techniques/</link>
	<description>The Linux Blog, General Linux, Shell Scripts</description>
	<lastBuildDate>Fri, 17 May 2013 01:16:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Owen</title>
		<link>http://www.thelinuxblog.com/bash-scripting-techniques/comment-page-1/#comment-684</link>
		<dc:creator>Owen</dc:creator>
		<pubDate>Mon, 19 May 2008 23:36:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/bash-scripting-techniques/#comment-684</guid>
		<description><![CDATA[Yes, those techniques also work too.

@Heikki I always get confused the other way &amp; I&#039;m so used to typing that its no big deal.

I forgot to add another bash scripting technique. For looping over a file list. The best way I have found to do it is:
find . -iname &quot;*&quot; &#124; while read $i; do echo $i; done;

It works for looping over the current directory of files and works with spaces.

Doing a for i in $(ls); do echo $i; done; does not provide the same results.

Any one else have any scripting techniques that they like to use?]]></description>
		<content:encoded><![CDATA[<p>Yes, those techniques also work too.</p>
<p>@Heikki I always get confused the other way &#038; I&#8217;m so used to typing that its no big deal.</p>
<p>I forgot to add another bash scripting technique. For looping over a file list. The best way I have found to do it is:<br />
find . -iname &#8220;*&#8221; | while read $i; do echo $i; done;</p>
<p>It works for looping over the current directory of files and works with spaces.</p>
<p>Doing a for i in $(ls); do echo $i; done; does not provide the same results.</p>
<p>Any one else have any scripting techniques that they like to use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.thelinuxblog.com/bash-scripting-techniques/comment-page-1/#comment-683</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 19 May 2008 15:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/bash-scripting-techniques/#comment-683</guid>
		<description><![CDATA[Something like:
grep &quot;string&quot; file
works too, or more to my liking...to find all the files in all the subdirectories containing the string:

grep -r &quot;string&quot; *]]></description>
		<content:encoded><![CDATA[<p>Something like:<br />
grep &#8220;string&#8221; file<br />
works too, or more to my liking&#8230;to find all the files in all the subdirectories containing the string:</p>
<p>grep -r &#8220;string&#8221; *</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heikki Naski</title>
		<link>http://www.thelinuxblog.com/bash-scripting-techniques/comment-page-1/#comment-681</link>
		<dc:creator>Heikki Naski</dc:creator>
		<pubDate>Mon, 19 May 2008 07:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.thelinuxblog.com/bash-scripting-techniques/#comment-681</guid>
		<description><![CDATA[Some people recommend that instead of this:
cat  &#124; grep -i match

you should use this:
grep -i match filename

and instead of this:
cat  &#124; sed ’s/FIND/REPLACE/’ &gt; newfilename

use this:
sed ’s/FIND/REPLACE/’  &gt; newfilename

It&#039;s less typing and no need for another pipe.
I admit that I too often make the &quot;mistake&quot; of catting something to grep because I think that I want to put something in the stream and fish out something from there so it fits the mental pattern better.]]></description>
		<content:encoded><![CDATA[<p>Some people recommend that instead of this:<br />
cat  | grep -i match</p>
<p>you should use this:<br />
grep -i match filename</p>
<p>and instead of this:<br />
cat  | sed ’s/FIND/REPLACE/’ &gt; newfilename</p>
<p>use this:<br />
sed ’s/FIND/REPLACE/’  &gt; newfilename</p>
<p>It&#8217;s less typing and no need for another pipe.<br />
I admit that I too often make the &#8220;mistake&#8221; of catting something to grep because I think that I want to put something in the stream and fish out something from there so it fits the mental pattern better.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
