<?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"
	>
<channel>
	<title>Comments on: Identifying portrait/landscape in a set of images, with ImageMagick and BASH</title>
	<atom:link href="http://www.bytebot.net/blog/archives/2008/05/28/identifying-portraitlandscape-in-a-set-of-images-with-imagemagick-and-bash/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bytebot.net/blog/archives/2008/05/28/identifying-portraitlandscape-in-a-set-of-images-with-imagemagick-and-bash</link>
	<description>A permanent record for what's interesting today - this is my live journal</description>
	<pubDate>Fri, 21 Nov 2008 07:10:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: scally-cap162</title>
		<link>http://www.bytebot.net/blog/archives/2008/05/28/identifying-portraitlandscape-in-a-set-of-images-with-imagemagick-and-bash#comment-136151</link>
		<dc:creator>scally-cap162</dc:creator>
		<pubDate>Sat, 20 Sep 2008 14:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.bytebot.net/blog/?p=824#comment-136151</guid>
		<description>Whats up? 
&lt;a href="http://scally-cap.oxyhost.com/index.html" rel="nofollow"&gt;savonius turbine&lt;/a&gt; &lt;a href="http://scally-cap.oxyhost.com/index.html" rel="nofollow"&gt;savonius turbine&lt;/a&gt;
&lt;a href="http://scally-cap.oxyhost.com/sayula.html" rel="nofollow"&gt;sayula&lt;/a&gt; &lt;a href="http://scally-cap.oxyhost.com/sayula.html" rel="nofollow"&gt;sayula&lt;/a&gt;
That is my blog. Visit it, please. 
c U.</description>
		<content:encoded><![CDATA[<p>Whats up?<br />
<a href="http://scally-cap.oxyhost.com/index.html" rel="nofollow">savonius turbine</a> <a href="http://scally-cap.oxyhost.com/index.html" rel="nofollow">savonius turbine</a><br />
<a href="http://scally-cap.oxyhost.com/sayula.html" rel="nofollow">sayula</a> <a href="http://scally-cap.oxyhost.com/sayula.html" rel="nofollow">sayula</a><br />
That is my blog. Visit it, please.<br />
c U.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TimC</title>
		<link>http://www.bytebot.net/blog/archives/2008/05/28/identifying-portraitlandscape-in-a-set-of-images-with-imagemagick-and-bash#comment-134343</link>
		<dc:creator>TimC</dc:creator>
		<pubDate>Wed, 28 May 2008 11:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.bytebot.net/blog/?p=824#comment-134343</guid>
		<description>use "set -e" at the top of the script, and
mkdir -p to not fail if those directories already exist as directories.

Then if one of the mkdirs fail because they already exist as a *file*, then the subsequent mvs won't be executed, which is a very good thing, because otherwise you will end up repeatedly mving many files over the top of one file, and thus losing all but the last one of those files.  Yes, a colleague has done this running one of my scripts that wasn't defensive enough, without performing the tests I was expecting him to perform first.  No, we didn't have backups.

(alternatively, I would also consider using the construct
'yes no &#124; mv -i "$source" "$dest", which would negate the suggestion of using set -e, since it will simply refuse to overwrite anything anyway)

P.S.  Quote your "$i" :)

Defensive shell scripting is good, mmmkay? :)</description>
		<content:encoded><![CDATA[<p>use &#8220;set -e&#8221; at the top of the script, and<br />
mkdir -p to not fail if those directories already exist as directories.</p>
<p>Then if one of the mkdirs fail because they already exist as a *file*, then the subsequent mvs won&#8217;t be executed, which is a very good thing, because otherwise you will end up repeatedly mving many files over the top of one file, and thus losing all but the last one of those files.  Yes, a colleague has done this running one of my scripts that wasn&#8217;t defensive enough, without performing the tests I was expecting him to perform first.  No, we didn&#8217;t have backups.</p>
<p>(alternatively, I would also consider using the construct<br />
&#8216;yes no | mv -i &#8220;$source&#8221; &#8220;$dest&#8221;, which would negate the suggestion of using set -e, since it will simply refuse to overwrite anything anyway)</p>
<p>P.S.  Quote your &#8220;$i&#8221; :)</p>
<p>Defensive shell scripting is good, mmmkay? :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
