<?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: looping through files with spaces in the filenames in bash</title>
	<atom:link href="http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/</link>
	<description>Scripts, settings, and fixes...</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:37:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-32012</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 11 Jun 2010 15:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-32012</guid>
		<description>What a simple and elegant solution for something that has bugged me for ages.
Life-Saver!</description>
		<content:encoded><![CDATA[<p>What a simple and elegant solution for something that has bugged me for ages.<br />
Life-Saver!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ingvar Jungenäs</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-31184</link>
		<dc:creator>Ingvar Jungenäs</dc:creator>
		<pubDate>Mon, 24 May 2010 13:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-31184</guid>
		<description>For some reasons, qoute characters are missing in my previous post in the code string..</description>
		<content:encoded><![CDATA[<p>For some reasons, qoute characters are missing in my previous post in the code string..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ingvar Jungenäs</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-31183</link>
		<dc:creator>Ingvar Jungenäs</dc:creator>
		<pubDate>Mon, 24 May 2010 13:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-31183</guid>
		<description>Well, what do you say.  Tried to solve it my self for an hour or so,  then found it on google &quot;I&#039;m feeling lucky&quot;.  Thank you very much.
My problem: Find files in a directory structure, file names can include spaces, create symbolic names in the current directory.
The files are CA root certificates, link names should be the certificate hash. (a Sendmail + TLS configuration issue)

cd /etc/mailcerts/CA
find . -name *pem -print0 &#124; while read -d $&#039;&#039; file
do 
ln -s &quot;$file&quot; `openssl x509 -noout -hash &lt; &quot;$file&quot;`.0 
done</description>
		<content:encoded><![CDATA[<p>Well, what do you say.  Tried to solve it my self for an hour or so,  then found it on google &#8220;I&#8217;m feeling lucky&#8221;.  Thank you very much.<br />
My problem: Find files in a directory structure, file names can include spaces, create symbolic names in the current directory.<br />
The files are CA root certificates, link names should be the certificate hash. (a Sendmail + TLS configuration issue)</p>
<p>cd /etc/mailcerts/CA<br />
find . -name *pem -print0 | while read -d $&#8221; file<br />
do<br />
ln -s &#8220;$file&#8221; `openssl x509 -noout -hash &lt; &quot;$file&quot;`.0<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: caustik</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-30022</link>
		<dc:creator>caustik</dc:creator>
		<pubDate>Wed, 21 Apr 2010 13:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-30022</guid>
		<description>Thank you! Glad this came up in a google search, was really scratching my head.</description>
		<content:encoded><![CDATA[<p>Thank you! Glad this came up in a google search, was really scratching my head.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Rose</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-29771</link>
		<dc:creator>Benjamin Rose</dc:creator>
		<pubDate>Wed, 14 Apr 2010 23:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-29771</guid>
		<description>You could also use the bash input field separator. Just prepend it to whatever your usual way is. Default is all whitespace.

Example:

IFS=&quot;
&quot;

for file in `find . -type f&#124;grep .ext$`
do
   /do/something/to $file
done</description>
		<content:encoded><![CDATA[<p>You could also use the bash input field separator. Just prepend it to whatever your usual way is. Default is all whitespace.</p>
<p>Example:</p>
<p>IFS=&#8221;<br />
&#8220;</p>
<p>for file in `find . -type f|grep .ext$`<br />
do<br />
   /do/something/to $file<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: for Schleifen über Dateinamen mit Leerzeichen - worstcase.cc</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-28902</link>
		<dc:creator>for Schleifen über Dateinamen mit Leerzeichen - worstcase.cc</dc:creator>
		<pubDate>Thu, 18 Mar 2010 15:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-28902</guid>
		<description>[...] was soll ich sagen, nach einer stundenlangen Ausprobier-Orgie und Google-Recherchen habe ich hier den passenden Denkanstoß gefunden. #!/bin/bash &#160; find . -name &quot;*.srt&quot; &#124; while read [...]</description>
		<content:encoded><![CDATA[<p>[...] was soll ich sagen, nach einer stundenlangen Ausprobier-Orgie und Google-Recherchen habe ich hier den passenden Denkanstoß gefunden. #!/bin/bash &nbsp; find . -name &quot;*.srt&quot; | while read [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-28444</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 05 Mar 2010 17:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-28444</guid>
		<description>Awesome -- HUGE thanks!</description>
		<content:encoded><![CDATA[<p>Awesome &#8212; HUGE thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unix Commands &#171; Burgundywall.com</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-24671</link>
		<dc:creator>Unix Commands &#171; Burgundywall.com</dc:creator>
		<pubDate>Sun, 06 Dec 2009 21:34:49 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-24671</guid>
		<description>[...] To loop through files that have spaces in the name, try the following example from narrabilis.com [...]</description>
		<content:encoded><![CDATA[<p>[...] To loop through files that have spaces in the name, try the following example from narrabilis.com [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barton</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-24631</link>
		<dc:creator>Barton</dc:creator>
		<pubDate>Sat, 05 Dec 2009 16:28:50 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-24631</guid>
		<description>Thanks. In my case, I had a list of filenames, so:

cat list &#124; while read file
do
   doSomething $file
done</description>
		<content:encoded><![CDATA[<p>Thanks. In my case, I had a list of filenames, so:</p>
<p>cat list | while read file<br />
do<br />
   doSomething $file<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward</title>
		<link>http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/comment-page-1/#comment-23474</link>
		<dc:creator>Edward</dc:creator>
		<pubDate>Wed, 07 Oct 2009 18:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.narrabilis.com/wp/looping-through-files-with-spaces-in-the-names-in-bash/#comment-23474</guid>
		<description>I love you. This has bothered me for ages!</description>
		<content:encoded><![CDATA[<p>I love you. This has bothered me for ages!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
