<?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/"
	xmlns:georss="http://www.georss.org/georss" 	>
<channel>
	<title>Comments on: Bash For loop Example</title>
	<atom:link href="http://spiralbound.net/2007/07/23/bash-for-loop-example/feed" rel="self" type="application/rss+xml" />
	<link>http://spiralbound.net/2007/07/23/bash-for-loop-example</link>
	<description>my digital notebook</description>
	<lastBuildDate>Tue, 16 Mar 2010 21:23:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: omi</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-241196</link>
		<dc:creator>omi</dc:creator>
		<pubDate>Mon, 02 Nov 2009 13:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-241196</guid>
		<description>thanks a lot !!!!</description>
		<content:encoded><![CDATA[<p>thanks a lot !!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jadu Saikia</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-218249</link>
		<dc:creator>Jadu Saikia</dc:creator>
		<pubDate>Wed, 13 May 2009 10:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-218249</guid>
		<description>seq is very helpful. A related post
http://unstableme.blogspot.com/2008/12/ways-of-writing-bash-for-loop.html</description>
		<content:encoded><![CDATA[<p>seq is very helpful. A related post<br />
<a href="http://unstableme.blogspot.com/2008/12/ways-of-writing-bash-for-loop.html" rel="nofollow">http://unstableme.blogspot.com/2008/12/ways-of-writing-bash-for-loop.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balaji</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-212030</link>
		<dc:creator>Balaji</dc:creator>
		<pubDate>Wed, 15 Apr 2009 09:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-212030</guid>
		<description>Hi,

I got solution fro the above, i ran that in ksh, now i ran that under bash, now it is working fine.

For Loop in bash, pls browse:

http://tldp.org/LDP/abs/html/loops1.html

Regards
Balaji K</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I got solution fro the above, i ran that in ksh, now i ran that under bash, now it is working fine.</p>
<p>For Loop in bash, pls browse:</p>
<p><a href="http://tldp.org/LDP/abs/html/loops1.html" rel="nofollow">http://tldp.org/LDP/abs/html/loops1.html</a></p>
<p>Regards<br />
Balaji K</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balaji</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-211997</link>
		<dc:creator>Balaji</dc:creator>
		<pubDate>Wed, 15 Apr 2009 06:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-211997</guid>
		<description>Hi,
When i executed &quot; for (( i=1;i&1; &quot;

I got an error like: &quot; ./forloop.ksh[3]: syntax error at line 3 : `((&#039; unexpected &quot;

Request you to please provide me a solution for FOR LOOP with range like in C.

Regards
Balaji K</description>
		<content:encoded><![CDATA[<p>Hi,<br />
When i executed &#8221; for (( i=1;i&amp;1; &#8221;</p>
<p>I got an error like: &#8221; ./forloop.ksh[3]: syntax error at line 3 : `((&#8216; unexpected &#8221;</p>
<p>Request you to please provide me a solution for FOR LOOP with range like in C.</p>
<p>Regards<br />
Balaji K</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Price</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-211503</link>
		<dc:creator>Jeff Price</dc:creator>
		<pubDate>Mon, 13 Apr 2009 23:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-211503</guid>
		<description>with letters you can
cat&lt;&lt;EOF&#124;while read line; do echo -n “file$line “; touch file$line; done
first line
second line
another
another
EOF

or create a file delimited by new lines

cat thefile&#124;while read line; do echo -n “file$line “; touch file$line; done</description>
		<content:encoded><![CDATA[<p>with letters you can<br />
cat&lt;&lt;EOF|while read line; do echo -n “file$line “; touch file$line; done<br />
first line<br />
second line<br />
another<br />
another<br />
EOF</p>
<p>or create a file delimited by new lines</p>
<p>cat thefile|while read line; do echo -n “file$line “; touch file$line; done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Price</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-211501</link>
		<dc:creator>Jeff Price</dc:creator>
		<pubDate>Mon, 13 Apr 2009 22:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-211501</guid>
		<description>more of a lambda approach

seq 1 100&#124;while read i; do echo -n &quot;file${i} &quot;; touch file${i} 2&gt;&1; done</description>
		<content:encoded><![CDATA[<p>more of a lambda approach</p>
<p>seq 1 100|while read i; do echo -n &#8220;file${i} &#8220;; touch file${i} 2&gt;&amp;1; done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Gardner</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-208849</link>
		<dc:creator>Scott Gardner</dc:creator>
		<pubDate>Sun, 05 Apr 2009 01:27:47 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-208849</guid>
		<description>Never mind, I just converted my list to a comma-separated list and used...

touch {&#039;comma&#039;,&#039;separated&#039;,&#039;list&#039;}.txt</description>
		<content:encoded><![CDATA[<p>Never mind, I just converted my list to a comma-separated list and used&#8230;</p>
<p>touch {&#8216;comma&#8217;,&#8217;separated&#8217;,'list&#8217;}.txt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Gardner</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-208828</link>
		<dc:creator>Scott Gardner</dc:creator>
		<pubDate>Sat, 04 Apr 2009 23:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-208828</guid>
		<description>Can you provide a script that would read a text file list of companies, and batch create individual text files for each company? TIA!</description>
		<content:encoded><![CDATA[<p>Can you provide a script that would read a text file list of companies, and batch create individual text files for each company? TIA!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cliff</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-203711</link>
		<dc:creator>cliff</dc:creator>
		<pubDate>Mon, 23 Mar 2009 03:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-203711</guid>
		<description>Dan,

Not arguing your point, but the purpose of this was never to provide the world with a script that creates numbered files. The only real point was to help me remember how to do something for each line of output from some random program. What can I say, I have a bad memory.</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Not arguing your point, but the purpose of this was never to provide the world with a script that creates numbered files. The only real point was to help me remember how to do something for each line of output from some random program. What can I say, I have a bad memory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-201112</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 13 Mar 2009 03:35:32 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-201112</guid>
		<description>This example parsing the output of seq to an array is considered very bad practice. seq is a non-standard unix/linux program and often isn&#039;t included in many distros.

The proper technique is to use either for-in as an iterator, or to use c-style looping as was mentioned in a few comments.</description>
		<content:encoded><![CDATA[<p>This example parsing the output of seq to an array is considered very bad practice. seq is a non-standard unix/linux program and often isn&#8217;t included in many distros.</p>
<p>The proper technique is to use either for-in as an iterator, or to use c-style looping as was mentioned in a few comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-186774</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 02 Feb 2009 20:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-186774</guid>
		<description>None of these work with solaris 5.8 bash...it doesnt have seq and i cant figure it out...VERY frustrating</description>
		<content:encoded><![CDATA[<p>None of these work with solaris 5.8 bash&#8230;it doesnt have seq and i cant figure it out&#8230;VERY frustrating</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-182290</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 17 Jan 2009 19:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-182290</guid>
		<description>Just came across this, but just for completeness:

Regarding using strings instead of numbers:

touch file{a..c}

or 

for i in {a..c}; do something...; done

or 

{&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;etc&#039;}</description>
		<content:encoded><![CDATA[<p>Just came across this, but just for completeness:</p>
<p>Regarding using strings instead of numbers:</p>
<p>touch file{a..c}</p>
<p>or </p>
<p>for i in {a..c}; do something&#8230;; done</p>
<p>or </p>
<p>{&#8216;a&#8217;,'b&#8217;,'c&#8217;,'etc&#8217;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-163586</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 21 Aug 2008 18:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-163586</guid>
		<description>How I can write loop without nubmers but with some strings like &#039;a&#039;, &#039;b&#039;, &#039;c&#039;?</description>
		<content:encoded><![CDATA[<p>How I can write loop without nubmers but with some strings like &#8216;a&#8217;, &#8216;b&#8217;, &#8216;c&#8217;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jica</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-160463</link>
		<dc:creator>jica</dc:creator>
		<pubDate>Wed, 30 Jul 2008 12:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-160463</guid>
		<description>ei thanks! very useful! :D</description>
		<content:encoded><![CDATA[<p>ei thanks! very useful! <img src='http://spiralbound.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-153704</link>
		<dc:creator>Duncan</dc:creator>
		<pubDate>Tue, 10 Jun 2008 15:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-153704</guid>
		<description>eloy: you can found a answer here :
http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/dblparens.html
so accully you can use a C-style in double parenthesis :)

P.S.: Google is your friend :)</description>
		<content:encoded><![CDATA[<p>eloy: you can found a answer here :<br />
<a href="http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/dblparens.html" rel="nofollow">http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/dblparens.html</a><br />
so accully you can use a C-style in double parenthesis <img src='http://spiralbound.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S.: Google is your friend <img src='http://spiralbound.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eloy</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-151919</link>
		<dc:creator>eloy</dc:creator>
		<pubDate>Thu, 22 May 2008 18:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-151919</guid>
		<description>kobit why double parenthesis is needed?</description>
		<content:encoded><![CDATA[<p>kobit why double parenthesis is needed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kobit</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-150544</link>
		<dc:creator>kobit</dc:creator>
		<pubDate>Wed, 07 May 2008 19:07:13 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-150544</guid>
		<description>Sorry my code was messed up in my previous comment. Hopefully it is OK this time:
&lt;code&gt;
for (( i=1;i&lt;=100;i+=1 )) ; do echo -n &quot;file${i} &quot;; touch file${i} 2&gt;&1; done
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Sorry my code was messed up in my previous comment. Hopefully it is OK this time:<br />
<code><br />
for (( i=1;i&lt;=100;i+=1 )) ; do echo -n "file${i} "; touch file${i} 2&gt;&amp;1; done<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kobit</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-150543</link>
		<dc:creator>kobit</dc:creator>
		<pubDate>Wed, 07 May 2008 19:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-150543</guid>
		<description>What about:
&lt;code&gt;
for (( i=1;i&1; done
&lt;/code&gt;
I guess for huge loops like 1000 or 100 000 this might work better.</description>
		<content:encoded><![CDATA[<p>What about:<br />
<code><br />
for (( i=1;i&amp;1; done<br />
</code><br />
I guess for huge loops like 1000 or 100 000 this might work better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bre</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-148862</link>
		<dc:creator>bre</dc:creator>
		<pubDate>Fri, 18 Apr 2008 17:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-148862</guid>
		<description>Haha, took a look at a couple of website just before happening upon yours.  There&#039;s no way I would have been able to figure this one out so quickly (if at all) if it hadn&#039;t have been for your great blurb on the subject here.  Thanks.</description>
		<content:encoded><![CDATA[<p>Haha, took a look at a couple of website just before happening upon yours.  There&#8217;s no way I would have been able to figure this one out so quickly (if at all) if it hadn&#8217;t have been for your great blurb on the subject here.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dionyziz</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-148734</link>
		<dc:creator>dionyziz</dc:creator>
		<pubDate>Thu, 17 Apr 2008 11:18:42 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-148734</guid>
		<description>Cheers! :-)</description>
		<content:encoded><![CDATA[<p>Cheers! <img src='http://spiralbound.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 4j4x</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-148098</link>
		<dc:creator>4j4x</dc:creator>
		<pubDate>Thu, 10 Apr 2008 01:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-148098</guid>
		<description>Thank you very much for the code.  :P
Nice and helpful..</description>
		<content:encoded><![CDATA[<p>Thank you very much for the code.  <img src='http://spiralbound.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
Nice and helpful..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BKC</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-148080</link>
		<dc:creator>BKC</dc:creator>
		<pubDate>Wed, 09 Apr 2008 18:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-148080</guid>
		<description>How about &quot;touch file{1..100}&quot; as an easier solution using bash.</description>
		<content:encoded><![CDATA[<p>How about &#8220;touch file{1..100}&#8221; as an easier solution using bash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-146878</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 25 Mar 2008 21:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-146878</guid>
		<description>Thanks for this, I couldn&#039;t find anywhere how to generate n numbers, seq worked like a charm.</description>
		<content:encoded><![CDATA[<p>Thanks for this, I couldn&#8217;t find anywhere how to generate n numbers, seq worked like a charm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-146787</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Mon, 24 Mar 2008 14:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-146787</guid>
		<description>Agreed, Thanks for posting.</description>
		<content:encoded><![CDATA[<p>Agreed, Thanks for posting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emily</title>
		<link>http://spiralbound.net/2007/07/23/bash-for-loop-example#comment-146567</link>
		<dc:creator>Emily</dc:creator>
		<pubDate>Fri, 21 Mar 2008 18:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://spiralbound.net/2007/07/23/bash-for-loop-example/#comment-146567</guid>
		<description>Thanks very much!  Never would have figured seq 1 10 needed to be $(seq 1 10)!!:)</description>
		<content:encoded><![CDATA[<p>Thanks very much!  Never would have figured seq 1 10 needed to be $(seq 1 10)!!:)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
