<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>EgonDev</title>
	<atom:link href="http://egoncasteel.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://egoncasteel.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 02 Nov 2011 01:38:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='egoncasteel.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/ed13734acd4e33aaf249a3a1151738fc?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>EgonDev</title>
		<link>http://egoncasteel.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://egoncasteel.wordpress.com/osd.xml" title="EgonDev" />
	<atom:link rel='hub' href='http://egoncasteel.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Some Validation</title>
		<link>http://egoncasteel.wordpress.com/2010/03/02/some-validation/</link>
		<comments>http://egoncasteel.wordpress.com/2010/03/02/some-validation/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 22:33:23 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=350</guid>
		<description><![CDATA[I started in web programing and have found that you can never underestimate ether the users stupidity or malicious intent. That means validation on every piece of info needs to be done. In the end you will be glad you added it even thou it is annoying and boring to program. Now there isn&#8217;t really a good reason [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=350&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I started in web programing and have found that you can never underestimate ether the users stupidity or malicious intent. That means validation on every piece of info needs to be done. In the end you will be glad you added it even thou it is annoying and boring to program.</p>
<p>Now there isn&#8217;t really a good reason other then the practice to add validation to the exercises you do while going through a programing book, but it just seems wrong to take input and not validate to me. So here are a couple of ways I have started doing it in Python</p>
<h2>Pick your option</h2>
<p>Here is a common validation task you will see a lot. The user must choose form a list of options.</p>
<p><pre class="brush: python;">
print &quot;temp conversion program&quot;
conType = &quot;none&quot;
while not(conType == &quot;ctf&quot; or conType == &quot;ftc&quot;):
    conType = raw_input(&quot;cel to fahr. or fahr to cel (enter ctf or ftc): &quot;)
sTemp = &quot;none&quot;
</pre></p>
<p>So in this chunk of code the user is being asked if he wants to go from cel to fahr. or fahr. to cel.  I only want to except ctf or ftc. Any thing else will mess up the rest of the program.</p>
<p>Notice I set the conType var before the while loop that holds the prompt for the user. This is so the program will ask the use for input on the first time through. Now if the user inputs one of the chosses I want to see the while loop will eval false and the program will move on. If the user enters something I don&#8217;t want to see the while loop will eval true and give the user a chance to try again.</p>
<h2>Getting the right type of input</h2>
<p>Here is another validation problem that comes up a lot. Getting the right type of input. In this case the &#8220;type&#8221; I am talking about is data type (str, int, float, &#8230;).</p>
<p><pre class="brush: python;">
change = &quot;none&quot;
while change == &quot;none&quot;:
    try:
        change = float(raw_input(&quot;enter the change: &quot;))
    except:
        print &quot;** input must be a float **&quot;
        change = &quot;none&quot;
        pass
</pre></p>
<p>In this code sample I am trying to get the user to give me something I can turn in to a float (ex. 12.56). Now I have still wrapped the input section in a while loop, but now we have the try and except statements in the mix. Here is what I am telling Python to do:</p>
<ul>
<li>Try to
<ul>
<li>Take the the users input</li>
<li>Change the users input in to a float</li>
<li>Assign that float</li>
</ul>
</li>
<li>If any of the things you try raise an error
<ul>
<li>Tell the user they failed</li>
<li>Set change back to &#8220;none&#8221; (so the while loop will execute again)</li>
<li>Don&#8217;t show the user any errors or stop the program
<ul>
<li>That is what the &#8220;pass&#8221; keyword does in the except block</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>This will work for any of Python&#8217;s type convert functions.  With this method you get the best of both worlds. You get your input converted and you take care of validation.  If you did this with a regular expression you would have all the over head of the regular expression engine, and you still wouldn&#8217;t be 100% sure if Python can convert the type because you haven&#8217;t asked it to yet .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/350/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=350&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2010/03/02/some-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>Posting Source Code</title>
		<link>http://egoncasteel.wordpress.com/2010/03/02/posting-source-code/</link>
		<comments>http://egoncasteel.wordpress.com/2010/03/02/posting-source-code/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:42:09 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=348</guid>
		<description><![CDATA[I am just tired of looking this article up so I am adding a link to it here http://en.support.wordpress.com/code/posting-source-code/ If you cant guess it is an article on how to post code on wordpress.com blogs.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=348&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am just tired of looking this article up so I am adding a link to it here<br />
<a href="http://en.support.wordpress.com/code/posting-source-code/">http://en.support.wordpress.com/code/posting-source-code/</a></p>
<p>If you cant guess it is an article on how to post code on wordpress.com blogs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/348/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/348/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/348/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=348&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2010/03/02/posting-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>Python Modules :: Building a little Library</title>
		<link>http://egoncasteel.wordpress.com/2010/03/02/python-modules-building-a-little-library/</link>
		<comments>http://egoncasteel.wordpress.com/2010/03/02/python-modules-building-a-little-library/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:20:50 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=346</guid>
		<description><![CDATA[Here is what I did for my little dev library for Python Made a directory in my home folder called /home/egon/pyModules Added an empty file to my home directory, the pyModules director, and inside any sub-directories named __init__.py So what does that get you? Well now I can import scripts buy using a statement like this: This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=346&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Here is what I did for my little dev library for Python</h2>
<ul>
<li>Made a directory in my home folder called /home/egon/pyModules</li>
<li>Added an empty file to my home directory, the pyModules director, and inside any sub-directories named __init__.py</li>
</ul>
<h2>So what does that get you?</h2>
<p>Well now I can import scripts buy using a statement like this:</p>
<p><pre class="brush: python;">import pyModules.easygui.easygui</pre></p>
<p>This will import the easygui module from the /home/egon/pyModules/easygui directory. You can now use functions defined in the easygui module calling them as such:</p>
<p><pre class="brush: python;">pyModule.easygui.easygui.msgbox('hello')</pre></p>
<p><em>don&#8217;t worry there is a short cut coming</em></p>
<p><em> </em> Now you really don&#8217;t want to type pyModules.stuff.stuff every time you want to access a method so here is the shortcut:</p>
<p><pre class="brush: python;">egui = pyModule.easygui.easygui
egui.msgbox('hello')</pre></p>
<p><em>See told you not to worry</em></p>
<p><em> </em>Once you assign the module you imported to a new name you can use that name instead of the full reference.</p>
<h2>So what is going on here?</h2>
<p>Well in Ubuntu your home directory is part of your Python path (where Python gos looking when you try to import a module). By adding the __init__.py files it tells Python to treat those directories as modules. That allows us to you the dot notation to get to the module you want to import.</p>
<h2>Why bother?</h2>
<p>I just came up with this scheme to organize the modules I would using while learning Python. I didn&#8217;t want to just drop them into my home directory or the main Python directory. This seemed like a good way to do it to me, but I would never dare say it is a good idea for everyone. Also this maybe  a really ugly way to do it. I don&#8217;t know enough about Python yet to say. Feel free to put a better solution in comments.</p>
<p><em><br />
</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/346/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/346/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/346/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=346&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2010/03/02/python-modules-building-a-little-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>Back on the Snake</title>
		<link>http://egoncasteel.wordpress.com/2010/03/02/back-on-the-snake/</link>
		<comments>http://egoncasteel.wordpress.com/2010/03/02/back-on-the-snake/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 20:01:47 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/2010/03/02/back-on-the-snake/</guid>
		<description><![CDATA[It has been awhile, but I thought I would post some more. About 2 years ago I spent a couple of weeks learning Python, and I really liked it. Well everything I learned is now forgotten, but I thought I would take another crack at it. So you can expect to see some more Python [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=344&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It has been awhile, but I thought I would post some more. About 2 years ago I spent a couple of weeks learning Python, and I really liked it. Well everything I learned is now forgotten, but I thought I would take another crack at it. So you can expect to see some more Python posts here soon. Just remember I am learning Python as I go so I am sure that some of this will not be best practices. Hell some of it is going to be down right wrong I am sure.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=344&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2010/03/02/back-on-the-snake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>It is almost that time of year again</title>
		<link>http://egoncasteel.wordpress.com/2009/10/13/it-is-almost-that-time-of-year-again/</link>
		<comments>http://egoncasteel.wordpress.com/2009/10/13/it-is-almost-that-time-of-year-again/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 21:26:13 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/2009/10/13/it-is-almost-that-time-of-year-again/</guid>
		<description><![CDATA[www.childsplaycharity.org<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=338&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.childsplaycharity.org/index.php"><img class="alignleft size-full wp-image-337" title="childsplay" src="http://egoncasteel.files.wordpress.com/2009/10/cp_nodate.gif" alt="childsplay" width="582" height="582" /></a></p>
<p><a href="http://www.childsplaycharity.org">www.childsplaycharity.org</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=338&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/10/13/it-is-almost-that-time-of-year-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>

		<media:content url="http://egoncasteel.files.wordpress.com/2009/10/cp_nodate.gif" medium="image">
			<media:title type="html">childsplay</media:title>
		</media:content>
	</item>
		<item>
		<title>Awk as a Templating Language</title>
		<link>http://egoncasteel.wordpress.com/2009/07/27/awk-as-a-templating-language/</link>
		<comments>http://egoncasteel.wordpress.com/2009/07/27/awk-as-a-templating-language/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 21:31:34 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=330</guid>
		<description><![CDATA[Preface This is an article I wrote for work but I thought that it may be useful to others as well. It describes how to use awk as a simple templating language to run multiple command in a linux/unix environment. It talk specifically about a command we use called btq_submit which submits reports to our report [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=330&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Preface</h2>
<p>This is an article I wrote for work but I thought that it may be useful to others as well. It describes how to use awk as a simple templating language to run multiple command in a linux/unix environment. It talk specifically about a command we use called btq_submit which submits reports to our report queuing system but you could applied the technique to any comandline command.</p>
<p>This is a technique to use AWK to create an input and template to run reports. This method has a lot of over head so it will most likely only be useful where there is a report ran for many different sets of vars.</p>
<h2 style="font-size:1.5em;">Overview</h2>
<p>The command has 2 parts. The first part is the input. The input is what provides the information to the template. The template is the second part. It takes the input and writes out the btq_submit block.</p>
<table style="cursor:default;width:700px;border:1px dashed #bbbbbb;" border="0" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;width:500px;border:1px dashed #bbbbbb;margin:8px;">
<div><span style="font-family:'courier new', courier;">#!/bin/sh</span></div>
<div><span style="font-family:'courier new', courier;">#test script for using awk to run reports</span></div>
<div><span style="font-family:'courier new', courier;"># vars</span></div>
<div><span style="font-family:'courier new', courier;"># store:[store num]:[store abbr]</span></div>
<div><span style="font-family:'courier new', courier;"># market:[market abbr]</span></div>
<div><span style="font-family:'courier new', courier;">#</span></div>
<div><span style="font-family:'courier new', courier;"># run line</span></div>
<div><span style="font-family:'courier new', courier;"># run:[department]:[start minor]:[end minor]</span></div>
<div><span style="font-family:'courier new', courier;"><strong>echo &#8220;</strong></span></div>
<div><span style="color:#339966;">market:MSN\n</span></div>
<div><span style="color:#339966;">store:10:MAD\n</span></div>
<div><span style="color:#0000ff;">run:FURN:310:574Z\n</span></div>
<div><span style="color:#0000ff;">run:TV:000:046\n</span></div>
<div><span style="color:#0000ff;">run:STER:044:083Z\n</span></div>
<div><span style="color:#0000ff;">run:SE:084:149Z\n</span></div>
<div><span style="color:#0000ff;">run:COMP:150:249Z\n</span></div>
<div><span style="color:#0000ff;">run:APPL:250:309Z\n</span></div>
<div><span style="color:#339966;">store:12:EST\n</span></div>
<div><span style="color:#0000ff;">run:FURN:310:574Z\n</span></div>
<div><span style="color:#0000ff;">run:TV:000:046\n</span></div>
<div><span style="color:#0000ff;">run:STER:044:083Z\n</span></div>
<div><span style="color:#0000ff;">run:SE:084:149Z\n</span></div>
<div><span style="color:#0000ff;">run:COMP:150:249Z\n</span></div>
<div><span style="color:#0000ff;">run:APPL:250:309Z\n</span></div>
<div><span style="font-family:'courier new', courier;"><strong>&#8220;|awk &#8216;</strong></span></div>
<div><span style="color:#ff0000;"> BEGIN{</span></div>
<div><span style="color:#ff0000;"> RS=&#8221;\n&#8221;;</span></div>
<div><span style="color:#ff0000;"> FS=&#8221;:&#8221;;</span></div>
<div><span style="color:#ff0000;"> }</span></div>
<div><span style="color:#339966;"> /^market/{</span></div>
<div><span style="color:#339966;"> market=$2;</span></div>
<div><span style="color:#339966;"> }</span></div>
<div><span style="color:#339966;"> /^store/{</span></div>
<div><span style="color:#339966;"> store_num=$2;</span></div>
<div><span style="color:#339966;"> store_abbr=$3;</span></div>
<div><span style="color:#339966;"> }</span></div>
<div><span style="font-family:'courier new', courier;"> </span></div>
<div><span style="color:#ff0000;"> /^#/ {</span></div>
<div><span style="color:#ff0000;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#ff0000;"> print &#8220;echo \&#8221;"$0&#8243;\&#8221;";</span></div>
<div><span style="color:#ff0000;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#ff0000;"> }</span></div>
<div><span style="font-family:'courier new', courier;"> </span></div>
<div><span style="font-family:'courier new', courier;"> </span> <span style="color:#0000ff;">/^run/{</span></div>
<div><span style="color:#0000ff;"> dept=$2</span></div>
<div><span style="color:#0000ff;"> start_minor=$3;</span></div>
<div><span style="color:#0000ff;"> end_minor=$4;</span></div>
<div><span style="color:#0000ff;"> </span></div>
<div><span style="color:#0000ff;"> </span></div>
<div><span style="color:#0000ff;"> print &#8220;btq_submit -c H prclst &lt;</span></div>
<div><span style="color:#0000ff;"> print store_abbr&#8221; &#8221; dept;</span></div>
<div><span style="color:#0000ff;"> print market;</span></div>
<div><span style="color:#0000ff;"> print store_num;</span></div>
<div><span style="color:#0000ff;"> print start_minor;</span></div>
<div><span style="color:#0000ff;"> print end_minor</span></div>
<div><span style="color:#0000ff;"> print &#8220;AAAA&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;ZZZZ&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;A&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;2&#8243;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;N&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;N&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;N&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;N&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;END&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#0000ff;"> print &#8220;&#8221;;</span></div>
<div><span style="color:#0000ff;"> }</span></div>
<div><span style="font-family:'courier new', courier;"><strong>&#8216;|sh</strong></span></div>
</td>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;border:1px dashed #bbbbbb;margin:8px;" valign="top"><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>&lt;&#8211; Start of the input section</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>&lt;&#8211; end of input </strong></p>
<p><strong>&lt;&#8211; setting up vars in AWK</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>&lt;&#8211; Start of run command that will make the btq_submit block</strong></td>
</tr>
</tbody>
</table>
<h2 style="font-size:1.5em;">How AWK Works</h2>
<p>What AWK does is that it takes input and then brakes that input in to records and fields. It then preforms actions on those records and field and produces output. If you look at our input section each line is one record. Each field in the record is separated by a :</p>
<p><strong>example</strong></p>
<p><strong> </strong></p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">run:FURN:310:574Z\n</td>
</tr>
</tbody>
</table>
<ul>
<li>Is one record
<ul>
<li>&#8220;\n&#8221; tells awk that this is the end of the record</li>
</ul>
</li>
<li>Has 4 fields
<ul>
<li>field 1 is &#8220;run&#8221;</li>
<li>field 2 is &#8220;FURN&#8221;</li>
<li>field 3 is &#8220;310&#8243;</li>
<li>field 4 is &#8220;574Z&#8221;</li>
</ul>
</li>
</ul>
<p>Now if we want AWK to do something when it sees this record we need to make a block for it in the AWK command.</p>
<p><strong>example</strong></p>
<p><strong> </strong></p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">/^run/{</p>
<p>dept=$2;</p>
<p>start=$3;</p>
<p>end=$4;</p>
<p>print &#8220;dept is &#8220;dept&#8221;, start is &#8220;start&#8221;, end is &#8220;end;</p>
<p>}</td>
</tr>
</tbody>
</table>
<p>The first part (/^run/) means: if the record start with run then do the following. The part inside the {} is the block of code to run. Here we are setting 3 vars from the feilds in the record. $[field number] is how you access the text in a field. $2 is the second field $3 is the third field &#8230; The last line is a print command. The sections in &#8220;&#8221; will be printed as text. Var names not in quotes will be substituted with there value.</p>
<p>The result returned by AWK for the above example is: dept is FURN, start is 310, end is 574Z</p>
<h2 style="font-size:1.5em;">Parts of the Command</h2>
<p>echo&#8221;[input]&#8220;|awk &#8216;[awk program]&#8216;|sh</p>
<p>You must first echo your input and pipe it into the AWK command. You must then pipe the output of the AWK command to the shell if you want it to run the reports. You must have the &#8220;|sh&#8221; on the end if you want the script outputted by the AWK command to run. If you leave it off it will just output to the screen. This can be useful for debugging.</p>
<h3 style="font-size:1.17em;">BEGIN block</h3>
<p>At the start of the awk program there is a special block names BEGIN. The BEGIN block will execute before anything else in the awk program. In the begin block you have to set the separators that awk uses to tell the records and fields apart in the input. If you do not set these awk will default to RS=&#8221;\n&#8221; and FS=&#8221; &#8220;. Not normally what you want.</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">BEGIN{</p>
<p>RS=&#8221;\n&#8221;;</p>
<p>FS=&#8221;:&#8221;;</p>
<p>}</td>
</tr>
</tbody>
</table>
<p>RS is the record separator</p>
<p>FS is the field separators</p>
<h2 style="font-size:1.5em;">Setting Up the Vars</h2>
<p>There are 2 ways to setup vars in this style of script. There is are persistent vars and there are run time vars.</p>
<h3 style="font-size:1.17em;">Persistent</h3>
<p>If you have one var that will be the same for several reports but not all reports you can use this method. If you look at the example the parts dealing with persistent vars are in <span style="color:#339966;">green</span> . In the input section they are written as [name]:[value1]:[value2] &#8230;  you can have as many values after the name as you want.</p>
<p>In the AWK section of the script you can see the sections that set the persistent var. the way these are written is</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;"><span style="color:#339966;">/^[name]/</span> {</p>
<p>[name of awk var1]=$2 #field 2 from input line;</p>
<p>[name of awk var1]=$3 #field 3 from input line;</p>
<p>}</td>
</tr>
</tbody>
</table>
<p>The part in green is how AWK knows what to do with the line from the input. AWK reads each line and then looks for any blocks to apply to that line. What the /^name/ means to AWK is &#8220;if the record starts with [name] then do the following&#8221;.</p>
<p><strong>example</strong><br />
If line starts with &#8220;market&#8221; then set the var market = to the second value in that line.</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">/^market/{market=$2;}</td>
</tr>
</tbody>
</table>
<p>Once you set a var in AWK it will retain that value until it is reset or the AWK program exits. So vars you set outside the run block may be used for several reports.</p>
<h3 style="font-size:1.17em;">At run time</h3>
<p>If there vars that will change with each report you can include then in the run line. If you do not want to place them in their own vars you can use the $[field] notation.</p>
<h2 style="font-size:1.5em;">The run Line</h2>
<p>This is where AWK will output the btq_submit block. This is done using the print command. There will be 1 run line for each report you want the script to run.</p>
<p><strong>example</strong></p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">/^run/{<br />
dept=$2<br />
start_minor=$3;<br />
end_minor=$4;</p>
<p>print &#8220;btq_submit -c H prclst &lt;<br />
print store_abbr&#8221; &#8221; dept;<br />
print market;<br />
print store_num;<br />
print start_minor;<br />
print end_minor<br />
print &#8220;AAAA&#8221;;<br />
print &#8220;ZZZZ&#8221;;<br />
print &#8220;A&#8221;;<br />
print &#8220;2&#8243;;<br />
print &#8220;N&#8221;;<br />
print &#8220;N&#8221;;<br />
print &#8220;N&#8221;;<br />
print &#8220;N&#8221;;<br />
print &#8220;&#8221;;<br />
print &#8220;&#8221;;<br />
print &#8220;END&#8221;;<br />
print &#8220;&#8221;;<br />
print &#8220;&#8221;;<br />
}</td>
</tr>
</tbody>
</table>
<p>If this line is ran it will produce an a result like the following.</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">btq_submit -c H prclst &lt;<br />
COT APPL<br />
STL<br />
31<br />
250<br />
309Z<br />
AAAA<br />
ZZZZ<br />
A<br />
2<br />
N<br />
N<br />
N<br />
N</p>
<p>END</td>
</tr>
</tbody>
</table>
<h2 style="font-size:1.5em;">Making Switch Vars</h2>
<p>Some times you may have a report parameter that is only different once or twice in a large number of reports. It would be a lot of extra work to state this parameter for every report just so it can be different once or twice. In these cases you can use this technique to make a switch var. A switch var is different from a normal var in that it has a default value. If you set a switch var the value you set it for will be used by the next report ran. The switch will then be set back to its default value and following reports will use the default value.</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">echo &#8220;<br />
date:1-JUL-09\n<br />
run:123:123\n<br />
run:234:234\n</p>
<p><span style="color:#ff0000;">S_sort:S\n</span><br />
run:234:234\n<br />
&#8220;|awk &#8216;<br />
BEGIN{<br />
RS=&#8221;\n&#8221;;<br />
FS=&#8221;:&#8221;;</p>
<p><span style="color:#ff0000;">S_sort=&#8221;D&#8221;;</span><br />
}</p>
<p>/^date/{date=$2;}<br />
<span style="color:#ff0000;">/^S_sort/{S_sort=$2;}</span></p>
<p>/^run/{<br />
s_minor=$2;<br />
e_minor=$3;</p>
<p>print &#8220;btq_submit -c A reportName &lt;<br />
print date&#8221; &#8220;s_minor&#8221;-&#8221;e_minor;<br />
print date;<br />
print &#8220;ALL&#8221;;<br />
print s_minor;<br />
print e_minor;<br />
<span style="color:#ff0000;">print S_sort;<br />
</span>print &#8220;END&#8221;;</p>
<p><span style="color:#ff0000;">S_sort=&#8221;D&#8221;</span><br />
}</td>
</tr>
</tbody>
</table>
<p>In the example above the lines for the switch var are in red.</p>
<ul>
<li>As far as the input part of the template you use the switch var the same way as you would use a normal var.
<ul>
<li>I like to name them starting with a capital S to show that it is a switch var and not a regular var.</li>
</ul>
</li>
<li>In the BEGIN block you need to set the switch var to its default value.</li>
<li>Make a set block for the switch block in the same way as you would for a normal var.</li>
<li>it is used in the print btq_submit area the same as a normal var.</li>
<li>at the end of the run block set the switch var back to its default</li>
</ul>
<p>You can have more then one switch var in a script, but you will need to have all of these parts for each one.</p>
<h2 style="font-size:1.5em;">For loops</h2>
<p>It is also possible to add looping to awk script. see the example below</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">#!/bin/sh</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">echo &#8220;test script \n\n\n&#8221;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">echo &#8220;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">date:3-jun-09\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">for_stores:MAD EST\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">run:xxy:123\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">run:yyy:234\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">for_stores:WAU OAK BDR;\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">run:yyx:345\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">run:yxx:456\n</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">&#8220;|awk &#8216;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">BEGIN {</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">RS=&#8221;\n&#8221;;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">FS=&#8221;:&#8221;;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">}</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">/^date/{date=$2;}</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">/^for_stores/{split($2,stores,/ /);}</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">/^run/{</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">slp=$2;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">minor=$3</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print &#8220;#########  start loop  #########&#8221;;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">for( i in stores){</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print &#8220;btq_sumit report -c A &lt;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print stores[i]&#8221; &#8220;date&#8221; and &#8220;slp;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print stores[i];</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print date;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print slp;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print minor;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print &#8220;END&#8221;;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">print &#8220;&#8221;;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">}</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">}</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:3380px;width:1px;height:1px;border:1px dashed #bbbbbb;">&#8216;</div>
<p>#!/bin/sh</p>
<p>echo &#8220;test script \n\n\n&#8221;</p>
<p>echo &#8220;</p>
<p>date:3-jun-09\n</p>
<p><span style="color:#ff0000;">for_stores:MAD EST\n</span></p>
<p>run:xxy:123\n</p>
<p>run:yyy:234\n</p>
<p><span style="color:#ff0000;">for_stores:WAU OAK BDR;\n</span></p>
<p>run:yyx:345\n</p>
<p>run:yxx:456\n</p>
<p>&#8220;|awk &#8216;</p>
<p>BEGIN {</p>
<p>RS=&#8221;\n&#8221;;</p>
<p>FS=&#8221;:&#8221;;</p>
<p>}</p>
<p>/^date/{date=$2;}</p>
<p><span style="color:#ff0000;">/^for_stores/{split($2,stores,/ /);}</span></p>
<p>/^run/{</p>
<p>slp=$2;</p>
<p>minor=$3</p>
<p>print &#8220;######### start loop #########&#8221;;</p>
<p><span style="color:#ff0000;">for( i in stores){</span></p>
<p>print &#8220;btq_sumit report -c A &lt;</p>
<p>print <span style="color:#ff0000;">stores[i]</span> &#8221; &#8220;date&#8221; and &#8220;slp;</p>
<p>print <span style="color:#ff0000;">stores[i]</span> ;</p>
<p>print date;</p>
<p>print slp;</p>
<p>print minor;</p>
<p>print &#8220;END&#8221;;</p>
<p>print &#8220;&#8221;;</p>
<p><span style="color:#ff0000;">}</span></p>
<p>}</p>
<p>&#8216;</td>
</tr>
</tbody>
</table>
<p>The output will look like this.</p>
<table style="cursor:default;" border="1" cellspacing="0" cellpadding="4" bgcolor="white">
<tbody>
<tr>
<td style="color:#000000;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;cursor:text;margin:8px;">######### start loop #########</p>
<p>btq_sumit report -c A &lt;</p>
<p>MAD 3-jun-09 and xxy</p>
<p>MAD</p>
<p>3-jun-09</p>
<p>xxy</p>
<p>123</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>EST 3-jun-09 and xxy</p>
<p>EST</p>
<p>3-jun-09</p>
<p>xxy</p>
<p>123</p>
<p>END</p>
<p>######### start loop #########</p>
<p>btq_sumit report -c A &lt;</p>
<p>MAD 3-jun-09 and yyy</p>
<p>MAD</p>
<p>3-jun-09</p>
<p>yyy</p>
<p>234</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>EST 3-jun-09 and yyy</p>
<p>EST</p>
<p>3-jun-09</p>
<p>yyy</p>
<p>234</p>
<p>END</p>
<p>######### start loop #########</p>
<p>btq_sumit report -c A &lt;</p>
<p>WAU 3-jun-09 and yyx</p>
<p>WAU</p>
<p>3-jun-09</p>
<p>yyx</p>
<p>345</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>OAK 3-jun-09 and yyx</p>
<p>OAK</p>
<p>3-jun-09</p>
<p>yyx</p>
<p>345</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>BDR; 3-jun-09 and yyx</p>
<p>BDR;</p>
<p>3-jun-09</p>
<p>yyx</p>
<p>345</p>
<p>END</p>
<p>######### start loop #########</p>
<p>btq_sumit report -c A &lt;</p>
<p>WAU 3-jun-09 and yxx</p>
<p>WAU</p>
<p>3-jun-09</p>
<p>yxx</p>
<p>456</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>OAK 3-jun-09 and yxx</p>
<p>OAK</p>
<p>3-jun-09</p>
<p>yxx</p>
<p>456</p>
<p>END</p>
<p>btq_sumit report -c A &lt;</p>
<p>BDR; 3-jun-09 and yxx</p>
<p>BDR;</p>
<p>3-jun-09</p>
<p>yxx</p>
<p>456</p>
<p>END</td>
</tr>
</tbody>
</table>
<p>What is important to notice here is that each run line will submit a report for each of the vars that the for_ var is set for. It is also important to notice that the for_ var remands set after each run line. So multiple runs can be made with out reseting the for_ var.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/330/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=330&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/07/27/awk-as-a-templating-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>100 Pushups</title>
		<link>http://egoncasteel.wordpress.com/2009/07/04/100-pushups/</link>
		<comments>http://egoncasteel.wordpress.com/2009/07/04/100-pushups/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 00:00:20 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=328</guid>
		<description><![CDATA[I decided that after almost 5 years behind a desk I should really start getting some exercise again. Of course like most people I don&#8217;t like exercise, and after the a fore  mentioned 5 years behind a desk I didn&#8217;t think I was ready to start  big with some thing like PX90. So after after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=328&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I decided that after almost 5 years behind a desk I should really start getting some exercise again. Of course like most people I don&#8217;t like exercise, and after the a fore  mentioned 5 years behind a desk I didn&#8217;t think I was ready to start  big with some thing like PX90. So after after looking around I decided to go with the <a href="http://hundredpushups.com/">100 pushup program</a>. Its simple, doesn&#8217;t require equipment, and it doesn&#8217;t take a lot of time.</p>
<p>I just finished my 3rd week of the program which puts me half way through. I wont lie. I am sore a lot of days but I feel pretty good. I haven&#8217;t been able to do push ups like this since playing sports back in high school, and I am starting to look a little leaner and buffer in the the chest and arms.</p>
<p>I don&#8217;t know if I will make it to the 100, but the program hasn&#8217;t killed me yet. I will proudly post the &#8221; I did the 100 badge&#8221; here if I make it. In the mean time I recommend the program to any one that wants to start small to get in shape.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/328/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=328&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/07/04/100-pushups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>Adventures in Home Computing</title>
		<link>http://egoncasteel.wordpress.com/2009/06/18/adventures-in-home-computing/</link>
		<comments>http://egoncasteel.wordpress.com/2009/06/18/adventures-in-home-computing/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:32:57 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=326</guid>
		<description><![CDATA[2 months ago the hard drive in the little asus computer I had been using for watching video in my bedroom died. It put up a good fight lasting 2 or 3 years as my anime torrenting and watching / web surfing box.  I had been planning on replacing it with my old gaming rig [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=326&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>2 months ago the hard drive in the little asus computer I had been using for watching video in my bedroom died. It put up a good fight lasting 2 or 3 years as my anime torrenting and watching / web surfing box.  I had been planning on replacing it with my old gaming rig any way now that I have the laptop. As it didn&#8217;t have the power for HD video. I had just planned on doing it on my schedule not at the whim of corrupting hard drives.</p>
<p>Moving on to the point of this rambling. I quickly setup what I needed on top of the old windows install already on the computer at the time. I planned to reinstall again once some new parts came in, but was being lazy since things were working with only a bug here or there. Last night I found that my computer had gotten some nasty spyware on it. Not sure where it came from, but after threatening the computer several time that I would mind wipe it if didn&#8217;t cooperate with the spyware removal program. I decided to take vengeance upon it.</p>
<p>Every thing went just fine. I am no stranger to doing a full reinstall, and I was up and running again in around 3 hours. That includes reinstalling 20 or so programs and such.</p>
<p>The conclusion I came to after this is, it so much nicer doing this now that I only use open source programs and a couple of pieces of freeware. Back 8 or 10 years ago when I used office, photoshop, dreamweaver, &#8230; the process was such a pain. Find the stack of cds, get all the keys. Spend all this time with long long installs of bloated DRM filled software. Now I just download 100mb or 200mb of apps and go.</p>
<p>I don&#8217;t have any games on this computer but now that I buy all my games thou Steam even those install are a breeze.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/326/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/326/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/326/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=326&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/06/18/adventures-in-home-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>New TinyMCE Version</title>
		<link>http://egoncasteel.wordpress.com/2009/06/10/new-tinymce-version/</link>
		<comments>http://egoncasteel.wordpress.com/2009/06/10/new-tinymce-version/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 16:58:44 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[OpsWeb]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=321</guid>
		<description><![CDATA[It had been some time since I had updated TinyMCE on OPSweb, but last month I finally got to it. I went from the last stable version of 2 to the latest stable release of 3, both with the appropriate versions of MCImageManager.  Paste from Word is the killer feature that prompted this upgrade. That [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=321&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It had been some time since I had updated <a href="http://tinymce.moxiecode.com/">TinyMCE</a> on OPSweb, but last month I finally got to it. I went from the last stable version of 2 to the latest stable release of 3, both with the appropriate versions of <a href="http://tinymce.moxiecode.com/plugins_imagemanager.php">MCImageManager</a>.  Paste from Word is the killer feature that prompted this upgrade. That and the bug that popped up in version 2.</p>
<blockquote><p>&#8220;I don&#8217;t know why it just started doing that. I was going to upgrade it any way let see if we get lucky and it just gos away.&#8221;</p></blockquote>
<p>I am impressed. The paste from Word tool works fairly well. This is something that many people had asked about. You could paste from Word in version 2, but Words idea of a HTML export is a nightmare.  If there is such a thing as anti-semantic HTML the crap the Word spits out would be it.</p>
<p>Oh and the bug went away.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=321&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/06/10/new-tinymce-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
		<item>
		<title>Making something complicated simple</title>
		<link>http://egoncasteel.wordpress.com/2009/06/10/making-something-complicated-simple/</link>
		<comments>http://egoncasteel.wordpress.com/2009/06/10/making-something-complicated-simple/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 16:22:00 +0000</pubDate>
		<dc:creator>egoncasteel</dc:creator>
				<category><![CDATA[What I Did Today]]></category>

		<guid isPermaLink="false">http://egoncasteel.wordpress.com/?p=319</guid>
		<description><![CDATA[I have made geometric solids before back in high school, but today I found a much simpler way to do it. “Slide-Together” Geometric Paper Constructions by George W. Hart shows  how to make them by sliding card stock cutouts togeather. No folding.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=319&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have made geometric solids before back in high school, but today I found a much simpler way to do it. <a href="http://www.georgehart.com/slide-togethers/slide-togethers.html">“Slide-Together” Geometric Paper Constructions</a> by George W. Hart shows  how to make them by sliding card stock cutouts togeather. No folding.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egoncasteel.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egoncasteel.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egoncasteel.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egoncasteel.wordpress.com&amp;blog=6358359&amp;post=319&amp;subd=egoncasteel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://egoncasteel.wordpress.com/2009/06/10/making-something-complicated-simple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a48dd1b34a8d69ecc70a8a8e666b6e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">egoncasteel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
