<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Saminda Wijeratne's Weblog</title>
	<atom:link href="http://samindaw.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://samindaw.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sun, 18 Oct 2009 05:16:14 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='samindaw.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a65be53f70954770d35fa17dbdb19a80?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Saminda Wijeratne's Weblog</title>
		<link>http://samindaw.wordpress.com</link>
	</image>
			<item>
		<title>Live Editing a Web Service or Making use of Axis2 Hotupdate feature in a cool way.</title>
		<link>http://samindaw.wordpress.com/2009/10/17/live-editing-a-web-service-or-making-use-of-axis2-hotupdate-feature-in-a-cool-way/</link>
		<comments>http://samindaw.wordpress.com/2009/10/17/live-editing-a-web-service-or-making-use-of-axis2-hotupdate-feature-in-a-cool-way/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 17:16:18 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=219</guid>
		<description><![CDATA[This is to inform that we now support the feature of making use of the hotupdate feature in axis2 web service feature.  Try this tutorial http://wso2.org/library/tutorials/live-edit-your-axis2-web-service-using-eclipse for more details. Basically it allows you to test your web service while you edit it. Really cool.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=219&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is to inform that we now support the feature of making use of the hotupdate feature in axis2 web service feature.  Try this tutorial <a href="http://wso2.org/library/tutorials/live-edit-your-axis2-web-service-using-eclipse">http://wso2.org/library/tutorials/live-edit-your-axis2-web-service-using-eclipse </a>for more details. Basically it allows you to test your web service while you edit it. Really cool.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=219&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/10/17/live-editing-a-web-service-or-making-use-of-axis2-hotupdate-feature-in-a-cool-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>How to write a axis2 web service within seconds</title>
		<link>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-axis2-web-service-within-seconds/</link>
		<comments>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-axis2-web-service-within-seconds/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 12:34:04 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=216</guid>
		<description><![CDATA[It is literally within seconds, given that you already have the java class which you intend to make it a web service.  Here&#8217;s the link http://wso2.org/library/tutorials/create-axis2-web-service-3-steps-using-eclipse. Will write a web service  which would be more close to a real world scenario next time. Any thoughts of improvement is welcome.
       [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=216&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It is literally within seconds, given that you already have the java class which you intend to make it a web service.  Here&#8217;s the link <a href="http://wso2.org/library/tutorials/create-axis2-web-service-3-steps-using-eclipse">http://wso2.org/library/tutorials/create-axis2-web-service-3-steps-using-eclipse</a>. Will write a web service  which would be more close to a real world scenario next time. Any thoughts of improvement is welcome.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=216&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-axis2-web-service-within-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>How to write a web service client with just 3 steps</title>
		<link>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-web-service-client-with-just-3-steps/</link>
		<comments>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-web-service-client-with-just-3-steps/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 12:31:00 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=214</guid>
		<description><![CDATA[I recently wrote an I article to WSO2 OT regarding creating a client to consume or should I say access a web service. Didn&#8217;t explain a complex scenario though. Only showed the simple case of accessing a Web Service. This is the link to access the tutorial http://wso2.org/library/tutorials/creating-web-service-client-3-steps-using-eclipse. Thinking of writing a tutorial with a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=214&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently wrote an I article to WSO2 OT regarding creating a client to consume or should I say access a web service. Didn&#8217;t explain a complex scenario though. Only showed the simple case of accessing a Web Service. This is the link to access the tutorial <a href="http://wso2.org/library/tutorials/creating-web-service-client-3-steps-using-eclipse">http://wso2.org/library/tutorials/creating-web-service-client-3-steps-using-eclipse</a>. Thinking of writing a tutorial with a more complex scenario of handling security or binary uploads/downloads.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=214&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/10/09/how-to-write-a-web-service-client-with-just-3-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>තල මල පිපිලා &#8211; Thala Mala Pipila</title>
		<link>http://samindaw.wordpress.com/2009/09/15/%e0%b6%ad%e0%b6%bd-%e0%b6%b8%e0%b6%bd-%e0%b6%b4%e0%b7%92%e0%b6%b4%e0%b7%92%e0%b6%bd%e0%b7%8f-thala-mala-pipila/</link>
		<comments>http://samindaw.wordpress.com/2009/09/15/%e0%b6%ad%e0%b6%bd-%e0%b6%b8%e0%b6%bd-%e0%b6%b4%e0%b7%92%e0%b6%b4%e0%b7%92%e0%b6%bd%e0%b7%8f-thala-mala-pipila/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 18:09:07 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=211</guid>
		<description><![CDATA[I think it was about more than 10 years ago when I last watched a stage drama. And that was මනමේ (maname), back when I was in school. Before that it was a stage drama called කැඩපත (kadapatha) &#8211; I barely remember that one. Even though I wasn&#8217;t dyeing to see another one, I always [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=211&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I think it was about more than 10 years ago when I last watched a stage drama. And that was මනමේ (maname), back when I was in school. Before that it was a stage drama called කැඩපත (kadapatha) &#8211; I barely remember that one. Even though I wasn&#8217;t dyeing to see another one, I always wanted to go watch a stage drama just for a change to all the big screen (wide-screen, lcd screen, television screen) movies. After missing several opportunity I finally got a chance to watch the famous stage artist Jayalath Manoratnes (ජයලත් මනෝරත්නයන්) thala mala pipila (තල මල පිපිලා) stage drama today.</p>
<p>When the drama started I was captured by the strange lighting that was made in the stage focussing the attention on a person wearing on a robot costume. Eventhough the constume wasn&#8217;t good enough to pass for a real robot, it made me feel that we are about to enter to a strange world. I sat up straighter on my chair. The year it said was 4000 AD. It explains that they no longer pocess anything called tradition (සම්ප්‍රදාය) or emotions (හැඟීම්) but there were a species called humans millenniums ago who did have it. The robot wanted to share one such historical scene with us. It was one of the wierdest way of stepping in to a story, but nonetheless the surrounding the lighting and the synthesized voice made it very interesting.</p>
<p>The story starts up from that point onwards, and I wont explain what the story is, because I would probably ruine the greateness of such an artistic creation just by trying to make you imagine what it was like. But I must say the attention to the details, the lighting, the music, the hilarity and the magnificent performance of the stage actors did not stir me even anything close to bordem. It kept us interested right until to the end.</p>
<p>Now I&#8217;m officially a sri lankan stage drama fan <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=211&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/09/15/%e0%b6%ad%e0%b6%bd-%e0%b6%b8%e0%b6%bd-%e0%b6%b4%e0%b7%92%e0%b6%b4%e0%b7%92%e0%b6%bd%e0%b7%8f-thala-mala-pipila/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>Why did the war in SL went on for more than 20 years?</title>
		<link>http://samindaw.wordpress.com/2009/09/15/why-did-the-war-in-sl-went-on-for-more-than-20-years/</link>
		<comments>http://samindaw.wordpress.com/2009/09/15/why-did-the-war-in-sl-went-on-for-more-than-20-years/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:26:26 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Society]]></category>
		<category><![CDATA[War]]></category>
		<category><![CDATA[Reason for 20 year conflict]]></category>
		<category><![CDATA[War in Sri Lanka]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=205</guid>
		<description><![CDATA[This is not entirely accurate, but close enough analogue. Found on the internet.
The 8 Monkeys
(This is reportedly based on an actual experiment conducted in the U.K.)
Put eight monkeys in a room. In the middle of the room is a ladder, leading to a bunch of bananas hanging from a hook on the ceiling.
Each time a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=205&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="font-size:16px;color:#0000ff;margin:0 0 1em;"><span style="color:#000000;">This is not entirely accurate, but close enough </span><span style="color:#000000;">analogue. Found on the internet.</span></p>
<p style="font-size:16px;color:#0000ff;margin:0 0 1em;">The 8 Monkeys</p>
<p>(This is reportedly based on an actual experiment conducted in the U.K.)</p>
<p style="text-align:justify;">Put eight monkeys in a room. In the middle of the room is a ladder, leading to a bunch of bananas hanging from a hook on the ceiling.<br />
Each time a monkey tries to climb the ladder, all the monkeys are sprayed with ice water, which makes them miserable. Soon enough, whenever a monkey attempts to climb the ladder, all of the other monkeys, not wanting to be sprayed, set upon him and beat him up. Soon, none of the eight monkeys ever attempts to climb the ladder.<br />
One of the original monkeys is then removed, and a new monkey is put in the room. Seeing the bananas and the ladder, he wonders why none of the other monkeys are doing the obvious.  But undaunted, he immediately begins to climb the ladder.<br />
All the other monkeys fall upon him and beat him silly. He has no idea why.</p>
<p style="text-align:justify;">However, he no longer attempts to climb the ladder.<br />
A second original monkey is removed and replaced. The newcomer again attempts to climb the ladder, but all the other monkeys hammer the crap out of him.</p>
<p style="text-align:justify;">This includes the previous new monkey, who, grateful that he’s not on the receiving end this time, participates in the beating because all the other monkeys are doing it.  However, he has no idea why he’s attacking the new monkey.<br />
One by one, all the original monkeys are replaced. Eight new monkeys are now in the room. None of them have ever been sprayed by ice water. None of them attempt to climb the ladder. All of them will enthusiastically beat up any new monkey who tries, without having any idea why.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=205&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/09/15/why-did-the-war-in-sl-went-on-for-more-than-20-years/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>Search &amp; Replace Strings Considering the whole file (non line-based) using &#8217;sed&#8217; command</title>
		<link>http://samindaw.wordpress.com/2009/08/15/search-replace-strings-considering-the-whole-file-non-line-based-using-sed-command/</link>
		<comments>http://samindaw.wordpress.com/2009/08/15/search-replace-strings-considering-the-whole-file-non-line-based-using-sed-command/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 16:55:01 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[ignore line-based sed]]></category>
		<category><![CDATA[linux sed search and replace whole file]]></category>
		<category><![CDATA[non line-based sed command]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=196</guid>
		<description><![CDATA[This was really stupid of &#8217;sed&#8217; command. I had a file which had 2 occurances of the same string in 2 different lines and i wanted only the first to be replace by some other string. Took me a while to figure out why the conventional sed command doesnt work. (Incase you are wondering its [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=196&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was really stupid of &#8217;sed&#8217; command. I had a file which had 2 occurances of the same string in 2 different lines and i wanted only the first to be replace by some other string. Took me a while to figure out why the conventional sed command doesnt work. (Incase you are wondering its because sed is a line-based command. i.e. reads a line from input, apply the whole sed logic and the mentioned operations in it, print the output and repeat the whole process for the rest of the input lines).</p>
<p>so anyway what you have to do is pretty simple. either you have to format your input to remove the new line characters and feed that as the input and somehow reintroduce the newline character after sed was applied, or feed the whole input to sed in a non-line-based form. Anyway found this on the net.<a href="http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/"> http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/</a>.</p>
<p>So coming back to what I wanted to do,</p>
<p>$ cat myfile | sed &#8216;<strong>:a;N;$!ba;</strong>s/originalstring/replacestring/&#8217;</p>
<p>notice the bolded characters added in the sed command. They are the extra addition to the conventional sed command we use for seach and replace strings.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=196&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/08/15/search-replace-strings-considering-the-whole-file-non-line-based-using-sed-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>අතීතය සිහිනයක් පමණයි&#8230;..</title>
		<link>http://samindaw.wordpress.com/2009/07/08/%e0%b6%85%e0%b6%ad%e0%b7%93%e0%b6%ad%e0%b6%ba-%e0%b7%83%e0%b7%92%e0%b7%84%e0%b7%92%e0%b6%b1%e0%b6%ba%e0%b6%9a%e0%b7%8a-%e0%b6%b4%e0%b6%b8%e0%b6%ab%e0%b6%ba%e0%b7%92/</link>
		<comments>http://samindaw.wordpress.com/2009/07/08/%e0%b6%85%e0%b6%ad%e0%b7%93%e0%b6%ad%e0%b6%ba-%e0%b7%83%e0%b7%92%e0%b7%84%e0%b7%92%e0%b6%b1%e0%b6%ba%e0%b6%9a%e0%b7%8a-%e0%b6%b4%e0%b6%b8%e0%b6%ab%e0%b6%ba%e0%b7%92/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 09:08:25 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Sinhala]]></category>
		<category><![CDATA[Songs]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[අතීතය සිහිනයක් පමණයි]]></category>
		<category><![CDATA[letting go of the past]]></category>
		<category><![CDATA[sinhala songs]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=182</guid>
		<description><![CDATA[This is a song which I&#8217;ve heard so often, but never appreciated its meaning before now. It is all about letting go of the past. Being humans we always tend to live in the past. Some of us more than others.
Here&#8217;s the lyrics
අතීතය සිහිනයක් පමණයි
සැබෑ සුවඳක් නෑ.......
එදා සෙනෙහෙන් නොබැඳුනානම්
මෙදා වියෝවක් නෑ.....

තැනූ මන්දිර බිඳී වැටුනත්
නෙතේ කඳුලක් [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=182&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a song which I&#8217;ve heard so often, but never appreciated its meaning before now. It is all about letting go of the past. Being humans we always tend to live in the past. Some of us more than others.</p>
<p>Here&#8217;s the lyrics</p>
<pre style="padding-left:60px;font-size:13px;">අතීතය සිහිනයක් පමණයි
සැබෑ සුවඳක් නෑ.......
එදා සෙනෙහෙන් නොබැඳුනානම්
මෙදා වියෝවක් නෑ.....

තැනූ මන්දිර බිඳී වැටුනත්
නෙතේ කඳුලක් නෑ....
සිනහ වෙන්නට වරම් නොලදත්
සිතේ කිලුටක් නෑ.....

අතීතය සිහිනයක්........

සොබා දහමට නොවන අවනත
ලොවේ කිසිවක් නෑ.....
ලොවේ පැරදුම මිසක කිසිදා
ලැබූ දිනුමක් නෑ....

අතීතය සිහිනයක්........</pre>
<p>Listen to the song <a href="http://ananmanan.org/sinhala_mp3/Karunarathna_Diwulgane_Athithaya_Sihinayak.mp3">අතීතය සිහිනයක් පමණයි &#8211; කරුණාරත්න දිවුල්ගනේ</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=182&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/07/08/%e0%b6%85%e0%b6%ad%e0%b7%93%e0%b6%ad%e0%b6%ba-%e0%b7%83%e0%b7%92%e0%b7%84%e0%b7%92%e0%b6%b1%e0%b6%ba%e0%b6%9a%e0%b7%8a-%e0%b6%b4%e0%b6%b8%e0%b6%ab%e0%b6%ba%e0%b7%92/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://ananmanan.org/sinhala_mp3/Karunarathna_Diwulgane_Athithaya_Sihinayak.mp3" length="3441144" type="audio/mpeg" />
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>How to trim a string using linux bash script</title>
		<link>http://samindaw.wordpress.com/2009/07/03/how-to-trim-a-string-using-linux-bash-script/</link>
		<comments>http://samindaw.wordpress.com/2009/07/03/how-to-trim-a-string-using-linux-bash-script/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 07:06:15 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[remove leading and trailing spaces in strings using bash script]]></category>
		<category><![CDATA[Trim string using bash script]]></category>
		<category><![CDATA[Using sed command to trim a string]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=180</guid>
		<description><![CDATA[This is pretty simply done using the sed command. All you have to know is regular expressions.
To remove leading white spaces
sed 's/^ *//g'
To remove trailing white spaces
sed 's/ *$//g'
So as an example,
$ echo "  aaaa   bbbb      " &#124; sed 's/^ *//g' &#124; sed 's/ *$//g'
aaaa   bbbb
Thats it.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=180&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is pretty simply done using the sed command. All you have to know is regular expressions.</p>
<p>To remove leading white spaces</p>
<pre style="padding-left:30px;">sed 's/^ *//g'</pre>
<p>To remove trailing white spaces</p>
<pre style="padding-left:30px;">sed 's/ *$//g'</pre>
<p>So as an example,</p>
<pre style="padding-left:30px;">$ echo "  aaaa   bbbb      " | sed 's/^ *//g' | sed 's/ *$//g'
aaaa   bbbb</pre>
<p>Thats it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=180&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/07/03/how-to-trim-a-string-using-linux-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>How (NOT) to Make Decisions</title>
		<link>http://samindaw.wordpress.com/2009/06/17/how-not-to-make-decisions/</link>
		<comments>http://samindaw.wordpress.com/2009/06/17/how-not-to-make-decisions/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 06:44:58 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=176</guid>
		<description><![CDATA[3 golden rules. Never ever ever ever make decisions when,

you are extremely sad (Because you wont see what you haven&#8217;t lost)
you are extremely happy (Because you wont see what you have lost)
you are extremely angry (Because you wont see what you may loose)

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=176&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>3 golden rules. Never ever ever ever make decisions when,</p>
<ul>
<li>you are extremely <span style="color:#808080;">sad</span> (Because you wont see what you haven&#8217;t lost)</li>
<li>you are extremely <span style="color:#000080;">happy</span> (Because you wont see what you have lost)</li>
<li>you are extremely <span style="color:#ff0000;">angry</span> (Because you wont see what you may loose)</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=176&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/06/17/how-not-to-make-decisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
		<item>
		<title>patch command in linux to apply a svn patch</title>
		<link>http://samindaw.wordpress.com/2009/06/03/patch-command-in-linux-to-apply-a-svn-patch/</link>
		<comments>http://samindaw.wordpress.com/2009/06/03/patch-command-in-linux-to-apply-a-svn-patch/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 17:36:24 +0000</pubDate>
		<dc:creator>samindaw</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[apply svn patch]]></category>
		<category><![CDATA[using patch command]]></category>

		<guid isPermaLink="false">http://samindaw.wordpress.com/?p=174</guid>
		<description><![CDATA[First of all how to create a patch if you dont know&#8230;
$ svn diff mychangedfile1 dir1/dir2/mychangeresource2 &#62; mypatch.txt
To apply this patch it needs to be in the same svn location as the patch was taken. Then using the patch command u apply the patch
$ patch -p0 &#60; patch.txt
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=174&subd=samindaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First of all how to create a patch if you dont know&#8230;<br />
$ svn diff mychangedfile1 dir1/dir2/mychangeresource2 &gt; mypatch.txt</p>
<p>To apply this patch it needs to be in the same svn location as the patch was taken. Then using the patch command u apply the patch<br />
$ patch -p0 &lt; patch.txt</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samindaw.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samindaw.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samindaw.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samindaw.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samindaw.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samindaw.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samindaw.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samindaw.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samindaw.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samindaw.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samindaw.wordpress.com&blog=4058564&post=174&subd=samindaw&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samindaw.wordpress.com/2009/06/03/patch-command-in-linux-to-apply-a-svn-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9064d5ae8163999ca7a510816165667?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">samindaw</media:title>
		</media:content>
	</item>
	</channel>
</rss>