<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Kunal's blog</title>
	
	<link>http://www.kunaldua.com/blog</link>
	<description>On technology, Liverpool FC and anything else that strikes my imagination.</description>
	<lastBuildDate>Mon, 02 Nov 2009 09:46:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/KunalDua" type="application/rss+xml" /><feedburner:emailServiceId>KunalDua</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>There’s bad luck, there’s rotten luck and then there’s Rafa’s luck</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/IgiYfZcafIE/</link>
		<comments>http://www.kunaldua.com/blog/?p=305#comments</comments>
		<pubDate>Mon, 02 Nov 2009 09:46:15 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[lfc]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=305</guid>
		<description>I know every club goes through a spell of bad luck, bad decisions and injuries but I don&amp;#8217;t remember seeing anything like this in the decade that I have followed football at *any* club. Exhibit A:
Uploaded with plasq&amp;#8217;s Skitch!
That&amp;#8217;s 7 regular first team starters injured and 3, if not 4, regular subs out injured as [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=116' rel='bookmark' title='Permanent Link: Rafa Rafa Benitez'&gt;Rafa Rafa Benitez&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=26' rel='bookmark' title='Permanent Link: How Rafa sees football'&gt;How Rafa sees football&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=91' rel='bookmark' title='Permanent Link: You can buy luck now?'&gt;You can buy luck now?&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>I know every club goes through a spell of bad luck, bad decisions and injuries but I don&#8217;t remember seeing anything like this in the decade that I have followed football at *any* club. Exhibit A:</p>
<div class="thumbnail"><a href="http://skitch.com/kunaldua/nfik6/liverpool-xi-missing-in-action-from-fulham-away"><img src="http://img.skitch.com/20091102-dy9t9qtrnbfcwxdsujjj812kbd.preview.jpg" alt="Liverpool XI Missing in Action from Fulham Away" /></a><br /><span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080">Uploaded with <a href="http://plasq.com/">plasq</a>&#8217;s <a href="http://skitch.com">Skitch</a>!</span></div>
<p>That&#8217;s 7 regular first team starters injured and 3, if not 4, regular subs out injured as well.</p>
<p>Add into the mix a defender returning from what seemed a serious injury (a defender that Rafa never really wanted in the first place but let&#8217;s not go there). A midfielder who caught flu after perhaps his best game in the red shirt against the biggest rivals and when he was finally starting to win the fans over. A striker who&#8217;s hardly trained all week. All 3 who probably wouldn&#8217;t have started if there were any realistic alternatives.</p>
<p>Now add a Ref who sees (and shows) red for seemingly no reason whatsoever and you have the perfect recipe for the most sickening final one-third of a game I&#8217;ve seen in a long, long time.</p>
<p>You don&#8217;t have to be a football pundit to see that these are extraordinary circumstances and to blame Rafa for this is so ridiculous, it isn&#8217;t even funny. Or maybe you have to be a Wheelan of a pundit to be so oblivious to the facts and spout whatever shit comes to your mind. If only they stopped to think before opening their mouth. Think? That would imply they had a brain, wouldn&#8217;t it. Well, like I said &#8211; let&#8217;s not go there.</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=116' rel='bookmark' title='Permanent Link: Rafa Rafa Benitez'>Rafa Rafa Benitez</a></li><li><a href='http://www.kunaldua.com/blog/?p=26' rel='bookmark' title='Permanent Link: How Rafa sees football'>How Rafa sees football</a></li><li><a href='http://www.kunaldua.com/blog/?p=91' rel='bookmark' title='Permanent Link: You can buy luck now?'>You can buy luck now?</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=IgiYfZcafIE:JVWlnRQSGhE:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=IgiYfZcafIE:JVWlnRQSGhE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=IgiYfZcafIE:JVWlnRQSGhE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=IgiYfZcafIE:JVWlnRQSGhE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=IgiYfZcafIE:JVWlnRQSGhE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/IgiYfZcafIE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=305</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=305</feedburner:origLink></item>
		<item>
		<title>Announcing Iglooo – Find books. Compare prices. Buy.</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/z646ehYkAIw/</link>
		<comments>http://www.kunaldua.com/blog/?p=300#comments</comments>
		<pubDate>Fri, 11 Sep 2009 21:16:17 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[iglooo]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=300</guid>
		<description>Pleased to announce Iglooo, a site that&amp;#8217;ll help you find the best deals on books online. Targeted at the Indian audience, it consolidates the results from multiple online book stores and presents them in a visually appealing, yet clutter free format. That&amp;#8217;s about it.
Give Iglooo a whirl and let me know what you think!


Related posts:Technology [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=70' rel='bookmark' title='Permanent Link: Technology that works'&gt;Technology that works&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=140' rel='bookmark' title='Permanent Link: Go on&amp;#8230;'&gt;Go on&amp;#8230;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=173' rel='bookmark' title='Permanent Link: Better Ingredients. Better Pizza. Worst Website.'&gt;Better Ingredients. Better Pizza. Worst Website.&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>Pleased to announce <a href="http://www.iglooo.in">Iglooo</a>, a site that&#8217;ll help you find the best deals on books online. Targeted at the Indian audience, it consolidates the results from multiple online book stores and presents them in a visually appealing, yet clutter free format. That&#8217;s about it.</p>
<p>Give <a href="http://www.iglooo.in">Iglooo</a> a whirl and let me know what you think!</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=70' rel='bookmark' title='Permanent Link: Technology that works'>Technology that works</a></li><li><a href='http://www.kunaldua.com/blog/?p=140' rel='bookmark' title='Permanent Link: Go on&#8230;'>Go on&#8230;</a></li><li><a href='http://www.kunaldua.com/blog/?p=173' rel='bookmark' title='Permanent Link: Better Ingredients. Better Pizza. Worst Website.'>Better Ingredients. Better Pizza. Worst Website.</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=z646ehYkAIw:cNaskOcSTww:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=z646ehYkAIw:cNaskOcSTww:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=z646ehYkAIw:cNaskOcSTww:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=z646ehYkAIw:cNaskOcSTww:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=z646ehYkAIw:cNaskOcSTww:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/z646ehYkAIw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=300</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=300</feedburner:origLink></item>
		<item>
		<title>Moved servers</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/vCFgWUI01Ag/</link>
		<comments>http://www.kunaldua.com/blog/?p=296#comments</comments>
		<pubDate>Tue, 18 Aug 2009 09:55:04 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=296</guid>
		<description>I recently switched servers and was a little lazy in moving everything over. You would have received a few 404s and possibly other errors while trying to download AAFTRU and other linked files. For that I apologize.
I belive everything should be fine now but if you do run into some problems please do let me [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=66' rel='bookmark' title='Permanent Link: Switching servers'&gt;Switching servers&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>I recently switched servers and was a little lazy in moving everything over. You would have received a few 404s and possibly other errors while trying to download AAFTRU and other linked files. For that I apologize.</p>
<p>I belive everything should be fine now but if you do run into some problems please do let me know by dropping a line at mail AT kunaldua DOT com.</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=66' rel='bookmark' title='Permanent Link: Switching servers'>Switching servers</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=vCFgWUI01Ag:YYVmJm17wBY:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=vCFgWUI01Ag:YYVmJm17wBY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=vCFgWUI01Ag:YYVmJm17wBY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=vCFgWUI01Ag:YYVmJm17wBY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=vCFgWUI01Ag:YYVmJm17wBY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/vCFgWUI01Ag" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=296</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=296</feedburner:origLink></item>
		<item>
		<title>Are you following football?</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/ouJKVJHQqJM/</link>
		<comments>http://www.kunaldua.com/blog/?p=291#comments</comments>
		<pubDate>Fri, 14 Aug 2009 19:05:07 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[football]]></category>
		<category><![CDATA[lfc]]></category>
		<category><![CDATA[sports]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=291</guid>
		<description>It&amp;#8217;s that time of the year again! Here&amp;#8217;s a quick update about the little &amp;#8220;service&amp;#8221; I have been providing.
Starting this season, updates will also be available for all Championship, League 1 and League 2 matches in addition to the English Premier League and UEFA Champions League games. FA Cup and League Cup action will also [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=78' rel='bookmark' title='Permanent Link: Champions League draw prediction'&gt;Champions League draw prediction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=178' rel='bookmark' title='Permanent Link: Free live Premier League/ Champions League/ FA Cup SMS updates'&gt;Free live Premier League/ Champions League/ FA Cup SMS updates&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=111' rel='bookmark' title='Permanent Link: A week is a long time in football (and life)'&gt;A week is a long time in football (and life)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>It&#8217;s that time of the year again! Here&#8217;s a quick update about the little &#8220;service&#8221; I have been providing.</p>
<p>Starting this season, updates will also be available for all Championship, League 1 and League 2 matches in addition to the English Premier League and UEFA Champions League games. FA Cup and League Cup action will also be covered.</p>
<p>Get your fix <a href="http://www.kunaldua.com/blog/?page_id=278">here</a>.</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=78' rel='bookmark' title='Permanent Link: Champions League draw prediction'>Champions League draw prediction</a></li><li><a href='http://www.kunaldua.com/blog/?p=178' rel='bookmark' title='Permanent Link: Free live Premier League/ Champions League/ FA Cup SMS updates'>Free live Premier League/ Champions League/ FA Cup SMS updates</a></li><li><a href='http://www.kunaldua.com/blog/?p=111' rel='bookmark' title='Permanent Link: A week is a long time in football (and life)'>A week is a long time in football (and life)</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=ouJKVJHQqJM:iO7vvmX1viE:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=ouJKVJHQqJM:iO7vvmX1viE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=ouJKVJHQqJM:iO7vvmX1viE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=ouJKVJHQqJM:iO7vvmX1viE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=ouJKVJHQqJM:iO7vvmX1viE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/ouJKVJHQqJM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=291</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=291</feedburner:origLink></item>
		<item>
		<title>10.5.8 brings support for cheap, no-name USB enclosures!</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/UM8kf3DeDoQ/</link>
		<comments>http://www.kunaldua.com/blog/?p=260#comments</comments>
		<pubDate>Thu, 06 Aug 2009 08:54:38 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=260</guid>
		<description>I have a couple of cheap, no-name 2.5&amp;#8243; hard disk USB enclosures with me that haven&amp;#8217;t worked with any of my Macs since time immemorial. They made weird noises and flashed lights when I plugged them into either my Powerbook or the 20&amp;#8243; Intel iMac. I also shrugged it off thinking &amp;#8220;oh these Macs are [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=112' rel='bookmark' title='Permanent Link: Album Art For The Rest of Us'&gt;Album Art For The Rest of Us&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>I have a couple of cheap, no-name 2.5&#8243; hard disk USB enclosures with me that haven&#8217;t worked with any of my Macs since time immemorial. They made weird noises and flashed lights when I plugged them into either my Powerbook or the 20&#8243; Intel iMac. I also shrugged it off thinking &#8220;oh these Macs are under powered&#8221; <sup><a href="#footnote-1-260" id="footnote-link-1-260" title="See the footnote.">1</a></sup> and grabbed the nearest Dell to transfer the data.<sup><a href="#footnote-2-260" id="footnote-link-2-260" title="See the footnote.">2</a></sup></p>
<p>Until this morning. I upgraded to 10.5.8 and later when I was going through the <a href="http://support.apple.com/kb/HT3606">release notes</a> I saw this innocent looking line:</p>
<blockquote><p>Improves compatibility with some external USB hard drives.</p></blockquote>
<p>Immediately I popped in my cheap, no-name hard disk enclosure (with the hard disk in it, of course!) and yes, the iMac detected it. I am still running Tiger on the Powerbook so have no way of verifying if it works likewise.</p>
<p>Macs have truly broken the final frontier as far as I am concerned!</p>
<br /><ol class="footnotes"><li id="footnote-1-260"> I do remember having some success getting my Powerbook to recognize the disk by using one of the 2&#215;1 USB cables and inserting both of the connectors at one end into the Powerbook   [<a href="#footnote-link-1-260">&#8617;</a>]</li><li id="footnote-2-260"> no need to rub it in, I am embarrassed enough admitting it in public!   [<a href="#footnote-link-2-260">&#8617;</a>]</li></ol>

<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=112' rel='bookmark' title='Permanent Link: Album Art For The Rest of Us'>Album Art For The Rest of Us</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=UM8kf3DeDoQ:LW0epwot6UM:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=UM8kf3DeDoQ:LW0epwot6UM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=UM8kf3DeDoQ:LW0epwot6UM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=UM8kf3DeDoQ:LW0epwot6UM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=UM8kf3DeDoQ:LW0epwot6UM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/UM8kf3DeDoQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=260</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=260</feedburner:origLink></item>
		<item>
		<title>echo what you read with IFS</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/mxpFouG0ymo/</link>
		<comments>http://www.kunaldua.com/blog/?p=193#comments</comments>
		<pubDate>Fri, 27 Feb 2009 20:14:17 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=193</guid>
		<description>Sample this code for reading a file line by line:

#!/bin/ksh
while read LINE
do
    echo "$LINE"
done &lt; $FILENAME

It works fine in most cases, where by most cases I mean your lines don't have any trailing spaces that you'd like to preserve. That's right, read reserves the right to kill the trailing (and leading) spaces [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=37' rel='bookmark' title='Permanent Link: The internals'&gt;The internals&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>Sample this code for reading a file line by line:</p>
<pre lang="bash" line="1">
#!/bin/ksh
while read LINE
do
    echo "$LINE"
done < $FILENAME
</pre>
<p>It works fine in most cases, where by most cases I mean your lines don't have any trailing spaces that you'd like to preserve. That's right, read reserves the right to kill the trailing (and leading) spaces from your lines. Sample this (from <a href="http://nixdoc.net/man-pages/Linux/ksh.1.html">ksh man page</a>):</p>
<blockquote><p>
The IFS parameter specifies a list of characters which are used to break a string up into several words; any characters from the set space, tab and newline that appear inthe IFS characters are called IFS white space. Sequences of one or more IFS white space characters, in combination with zero or one non IFS white space characters delimit a field. As a special case, leading and trailing IFS white space is stripped (i.e., no leading ortrailing emptyfield is created by it); leading or trailing non-IFS white space does create an empty field.Example: if IFS is set to `<space>:',the sequence of characters `<space>A<space>:<space><space>B::D' contains four fields: `A', `B', `' and `D'. Note that if the IFS parameter is set to the null string, no field splitting is done; if the parameter is unset, the default value of space, tab and newline is used.
</p></blockquote>
<p>So, the above code should be changed to this - just the one line added:</p>
<pre lang="bash" line="1">
#!/bin/ksh
IFS=""
while read LINE
do
    echo "$LINE"
done < $FILENAME
</pre>
<p>Now the above code gives the byte-by-byte output of the file. Or does it?</p>
<p>Problem is, if the file does not have an empty line at the end you'll see that the last line never shows up in the output! So how do we fix this? The "old-fashioned" way - by adding an extra "echo $LINE" outside the loop.</p>
<p>Does it work fine now? Not quite. Now you'll see an extra empty line at the end of the output file. How do we fix that? Use  "echo -n". The "-n" option tells echo not to print the trailing newline character.</p>
<p>So finally we have our code to read a file line by line, do something with that line and write a modified line - and preserve every single bit along the way. Here it is then:</p>
<pre lang="bash" line="1">
#!/bin/ksh
IFS=""
while read -r LINE
do
    echo "$LINE"
done < $FILENAME
echo -n $LINE
</pre>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=37' rel='bookmark' title='Permanent Link: The internals'>The internals</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=mxpFouG0ymo:pev26t3Juis:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=mxpFouG0ymo:pev26t3Juis:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=mxpFouG0ymo:pev26t3Juis:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=mxpFouG0ymo:pev26t3Juis:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=mxpFouG0ymo:pev26t3Juis:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/mxpFouG0ymo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=193</feedburner:origLink></item>
		<item>
		<title>Join Google Groups without Google id</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/lKkFVczOEOA/</link>
		<comments>http://www.kunaldua.com/blog/?p=221#comments</comments>
		<pubDate>Thu, 22 Jan 2009 03:02:52 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=221</guid>
		<description>If, like me, you don&amp;#8217;t have a Gmail id (shock horror!) it can be a pain trying to figure out how to join a Google Group1 . Some groups (like the Django ones) do have web pages with a sign-up form, but most don&amp;#8217;t. So how do you join those groups without going through all [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=71' rel='bookmark' title='Permanent Link: Google Will Eat Itself'&gt;Google Will Eat Itself&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=45' rel='bookmark' title='Permanent Link: Google Q&amp;#038;A'&gt;Google Q&amp;#038;A&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=28' rel='bookmark' title='Permanent Link: Google X (demo)'&gt;Google X (demo)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>If, like me, you don&#8217;t have a Gmail id (shock horror!) it can be a pain trying to figure out how to join a Google Group<sup><a href="#footnote-1-221" id="footnote-link-1-221" title="See the footnote.">1</a></sup> . Some groups (like the Django ones) do have web pages with a sign-up form, but most don&#8217;t. So how do you join those groups without going through all the Google id related shenanigans? Simple &#8211; type this in your address bar (and remember to press enter!):</p>
<blockquote><p>
http://groups.google.com/group/GroupName/boxsubscribe?email=emailid
</p></blockquote>
<p>Replace GroupName with the name of the group you want to join and emailid with your email id. In case you didn&#8217;t make any typos, you&#8217;ll find Google telling you that &#8220;a confirmation message has been sent&#8221; to your id. Just click on the link in that email and you are good to go.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Google" rel="tag">Google</a>, <a href="http://technorati.com/tag/Google+Groups" rel="tag"> Google Groups</a></p>
<br /><ol class="footnotes"><li id="footnote-1-221"> I know you can have a Google id that is NOT a Gmail id, but let&#8217;s leave that out for now.   [<a href="#footnote-link-1-221">&#8617;</a>]</li></ol>

<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=71' rel='bookmark' title='Permanent Link: Google Will Eat Itself'>Google Will Eat Itself</a></li><li><a href='http://www.kunaldua.com/blog/?p=45' rel='bookmark' title='Permanent Link: Google Q&#038;A'>Google Q&#038;A</a></li><li><a href='http://www.kunaldua.com/blog/?p=28' rel='bookmark' title='Permanent Link: Google X (demo)'>Google X (demo)</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=lKkFVczOEOA:ib4LoNOofRM:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=lKkFVczOEOA:ib4LoNOofRM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=lKkFVczOEOA:ib4LoNOofRM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=lKkFVczOEOA:ib4LoNOofRM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=lKkFVczOEOA:ib4LoNOofRM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/lKkFVczOEOA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=221</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=221</feedburner:origLink></item>
		<item>
		<title>Potato Potaato?</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/WODcsJg7yhQ/</link>
		<comments>http://www.kunaldua.com/blog/?p=216#comments</comments>
		<pubDate>Thu, 18 Dec 2008 12:31:17 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[USofA]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=216</guid>
		<description>No donor to the (Bill) Clinton foundation has raised more persistent questions than Frank Giustra, a Canadian mining executive. Mr. Clinton and Mr. Giustra shared a midnight banquet in September 2005 with Kazakhstan’s authoritarian president, Nursultan A. Nazarbayev. Mr. Clinton praised Mr. Nazarbayev’s bid to head an international election-monitoring organization, undercutting American foreign policy and [...]


No related posts.</description>
			<content:encoded><![CDATA[<blockquote><p>No donor to the (Bill) Clinton foundation has raised more persistent questions than Frank Giustra, a Canadian mining executive. Mr. Clinton and Mr. Giustra shared a midnight banquet in September 2005 with Kazakhstan’s authoritarian president, Nursultan A. Nazarbayev. Mr. Clinton praised Mr. Nazarbayev’s bid to head an international election-monitoring organization, undercutting American foreign policy and his wife’s sharp criticism of Kazakhstan’s human rights record.</p>
<p>Two days after the trip, Mr. Giustra’s company signed preliminary agreements giving it the right to buy into three uranium projects controlled by Kazakhstan. Spokesmen for both men said there was no connection between the trip and the deal. Months later, a foundation controlled by Mr. Giustra gave $31.3 million to the Clinton foundation, its largest known donation.</p></blockquote>
<p>Source: <a href="http://www.nytimes.com/2008/11/17/us/politics/17memo.htm">NYT</a>.</p>
<p>Politicians in the west play by the same set of rules as Indian schools then &#8211; a world where bribes go by the name of &#8220;donations&#8221;.</p>


<p>No related posts.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=WODcsJg7yhQ:eVDDjrksMqI:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=WODcsJg7yhQ:eVDDjrksMqI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=WODcsJg7yhQ:eVDDjrksMqI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=WODcsJg7yhQ:eVDDjrksMqI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=WODcsJg7yhQ:eVDDjrksMqI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/WODcsJg7yhQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=216</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=216</feedburner:origLink></item>
		<item>
		<title>You just freaked your wife out</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/tKvpUicg4mc/</link>
		<comments>http://www.kunaldua.com/blog/?p=211#comments</comments>
		<pubDate>Mon, 08 Dec 2008 18:19:16 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[football]]></category>
		<category><![CDATA[lfc]]></category>
		<category><![CDATA[wife]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=211</guid>
		<description>Background
For Liverpool fans, the perfect footballing weekend is:
1) Liverpool win.
2) ManU drop points (preferably lose).
3) Everton drop points (preferably lose).

Situation 1
Half Time, ManU vs Sunderland
Me: I have some good news and some bad news.
Wife: What?
Me: Good news is that Manu are drawing at Half Time. Bad news is they are still going to win.
(cut to [...]


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=18' rel='bookmark' title='Permanent Link: ManU to nick it this time?'&gt;ManU to nick it this time?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=91' rel='bookmark' title='Permanent Link: You can buy luck now?'&gt;You can buy luck now?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=26' rel='bookmark' title='Permanent Link: How Rafa sees football'&gt;How Rafa sees football&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>Background<br />
For Liverpool fans, the perfect footballing weekend is:<br />
1) Liverpool win.<br />
2) ManU drop points (preferably lose).<br />
3) Everton drop points (preferably lose).</p>
<hr />
Situation 1<br />
Half Time, ManU vs Sunderland</p>
<p>Me: I have some good news and some bad news.<br />
Wife: What?<br />
Me: Good news is that Manu are drawing at Half Time. Bad news is they are still going to win.</p>
<p>(cut to an hour later, into injury time at the Theater of Screams)</p>
<p>*Vidic scores the winner for ManU with barely a couple of minutes to go*</p>
<p>Me: I told you so.<br />
Wife (pissed off): I hate them!</p>
<hr />
Situation 2<br />
Mid-way through the second half in the Everton vs Aston Villa game, Everton trailing 1-2</p>
<p>Me: You know what I&#8217;d like. I&#8217;d like to see Everton equalize.<br />
Wife (dirty look): What?!<br />
Me: Yeah, I&#8217;d like to see them equalize, only for Villa to break their hearts with an injury time winner.</p>
<p>(cut to half an hour later)</p>
<p>*Everton equalize deep into injury time*</p>
<p>Me: Oh, well!<br />
Wife: Crap! <i>(or words to that effect)</i></p>
<p>*Before we have time to react further, Ashley Young pops up with the winner for Villa straight after play resumes. Ref signals end of game.*</p>
<p>Me (laughing uncontrollably): Ha ha ha, I love it!<br />
Wife (stares at me for a few seconds): You just freaked your wife out!</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=18' rel='bookmark' title='Permanent Link: ManU to nick it this time?'>ManU to nick it this time?</a></li><li><a href='http://www.kunaldua.com/blog/?p=91' rel='bookmark' title='Permanent Link: You can buy luck now?'>You can buy luck now?</a></li><li><a href='http://www.kunaldua.com/blog/?p=26' rel='bookmark' title='Permanent Link: How Rafa sees football'>How Rafa sees football</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=tKvpUicg4mc:nc9Iy5jjRjM:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=tKvpUicg4mc:nc9Iy5jjRjM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=tKvpUicg4mc:nc9Iy5jjRjM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=tKvpUicg4mc:nc9Iy5jjRjM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=tKvpUicg4mc:nc9Iy5jjRjM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/tKvpUicg4mc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=211</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=211</feedburner:origLink></item>
		<item>
		<title>I now know how to land a 747</title>
		<link>http://feedproxy.google.com/~r/KunalDua/~3/YXjsdFhhOBY/</link>
		<comments>http://www.kunaldua.com/blog/?p=204#comments</comments>
		<pubDate>Fri, 26 Sep 2008 14:29:52 +0000</pubDate>
		<dc:creator>Kunal</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://www.kunaldua.com/blog/?p=204</guid>
		<description>I am taking a printout of this with me when I board a 747 next.
(via kottke.org)


Related posts:Airplane on a conveyor beltThey say jump, you say how high


Related posts:&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=192' rel='bookmark' title='Permanent Link: Airplane on a conveyor belt'&gt;Airplane on a conveyor belt&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.kunaldua.com/blog/?p=139' rel='bookmark' title='Permanent Link: They say jump, you say how high'&gt;They say jump, you say how high&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description>
			<content:encoded><![CDATA[<p>I am taking a printout of <a href="http://www.sampottsinc.com/info/plus.html">this</a> with me when I board a 747 next.</p>
<p>(via <a href="http://www.kottke.org/08/09/how-to-land-a-747">kottke.org</a>)</p>


<p>Related posts:<ol><li><a href='http://www.kunaldua.com/blog/?p=192' rel='bookmark' title='Permanent Link: Airplane on a conveyor belt'>Airplane on a conveyor belt</a></li><li><a href='http://www.kunaldua.com/blog/?p=139' rel='bookmark' title='Permanent Link: They say jump, you say how high'>They say jump, you say how high</a></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KunalDua?a=YXjsdFhhOBY:ezT8vdPpldE:2mJPEYqXBVI"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=2mJPEYqXBVI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=YXjsdFhhOBY:ezT8vdPpldE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=YXjsdFhhOBY:ezT8vdPpldE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KunalDua?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KunalDua?a=YXjsdFhhOBY:ezT8vdPpldE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/KunalDua?i=YXjsdFhhOBY:ezT8vdPpldE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KunalDua/~4/YXjsdFhhOBY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kunaldua.com/blog/?feed=rss2&amp;p=204</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kunaldua.com/blog/?p=204</feedburner:origLink></item>
	</channel>
</rss>
