<?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/"
	>

<channel>
	<title>House of Metnetsky &#187; shell</title>
	<atom:link href="http://cowarthill.com/blog/index.php/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://cowarthill.com/blog</link>
	<description>Run Tortoise Run</description>
	<lastBuildDate>Fri, 26 Feb 2010 17:15:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Programming Tutorial: Unreachable Code</title>
		<link>http://cowarthill.com/blog/index.php/2009/03/24/programming-tutorial-unreachable-code/</link>
		<comments>http://cowarthill.com/blog/index.php/2009/03/24/programming-tutorial-unreachable-code/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 22:30:47 +0000</pubDate>
		<dc:creator>MET</dc:creator>
				<category><![CDATA[humor]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://cowarthill.com/blog/?p=240</guid>
		<description><![CDATA[Always run non-existent commands after unreachable code. if [ `id -u` != 0 ]; then sudo $0 exit $? fi if [ `dpkg -l &#124; grep sun-java5 &#124; wc -l` -eq 0 ]; then sh /media/cdrom0/application/appupgrade; # causes reboot else sh /media/cdrom0/application/sysupgrade; # causes reboot fi sudo updat-java-alternatives -s java-6-sun; exit 0; Discovered by Noah [...]]]></description>
			<content:encoded><![CDATA[<p>Always run non-existent commands after unreachable code.</p>
<pre class="brush: bash;">
if [ `id -u` != 0 ]; then
	sudo $0
	exit $?
fi

if [ `dpkg -l | grep sun-java5 | wc -l` -eq 0 ]; then
	sh /media/cdrom0/application/appupgrade; # causes reboot
else
	sh /media/cdrom0/application/sysupgrade; # causes reboot
fi

sudo updat-java-alternatives -s java-6-sun;

exit 0;
</pre>
<p>Discovered by Noah Massey.</p>
]]></content:encoded>
			<wfw:commentRss>http://cowarthill.com/blog/index.php/2009/03/24/programming-tutorial-unreachable-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
