Thursday, May 9, 2013

Visited Wonder La


Last week on 1st May holiday, went to Wonder la (@ Bangalore) and as usual Eesha was totally thrilled... We reached around 10:30 in the morning only to witness some good number of people already waiting at the ticket counters...It took us about 30-40 minutes to get our tickets and we were inside the amusement park in the next minute..
The huge crowd at the venue made us think probably we visited on the wrong day.It was too late to repent and the greediness to experience all the rides pulled our mind back. Attended to usual errands..rented one medium locker,dumped the belongings and returned with a venue map...

Most of the rides required minimum height of 140 cm and Eesha is just close to 90 cm ;-) Eesha was not allowed on the Flying Jumbo and we didn't take her to Moon walker..though she took this ride last time..Overall, she took about 10 different rides...Her most favorite is that giant wheel that even we haven't been...

We mustered courage to ride on Insanity and Y Scream and enjoyed the thrill of being thrown upside down. It really feels insane to realize that your life hinges on the normal functioning of one mechanical equipment operated electronically. There are few more rides that throws you around even worse. Once you make up your mind to trust the machines and sit on the ride, it is a matter of 60-90 seconds that you scream and voila, you can claim I'm not scared...Actually, I felt the fear is more due to not experiencing the ride than facing the risk in the riding itself...fear of not confronting ;-) Truth is it was quite safer with those clamps clutching your body and there was not much of a feeling of free fall anytime. It reminds me of that Vertical Velocity that I took at Six Flags (California,US)...that was scary, perhaps the clutch was bit loose (or we indians are too thin) ;-)

Recently, I have been seeing Ad about the Wonder la on National Television. Seems like company is planning to go public.
So far I have good opinion on the overall experience at Wonder la..Well managed and well trained staff. However, they need to ensure that the wait time is not too long..if you have to wait for 30 minutes or more for a 90 seconds ride, it can be frustrating..OK they have this premium Fast Track entry that entitles you to walk-in but the ticket costs twice ;-(

Overall we had good time and it was a good way to spend the day especially with kids...I wish they continue to maintain the quality and safety standards and I'm sure people will continue to flock.

Check out some photos and videos

Wonder la @ BLR

Tuesday, April 30, 2013

Linux - Some useful applications of sed and grep

1) sed - how to find and replace within a file

This is one of the basic application of sed

sed -i 's/find-pattern/replace-pattern/g' filename



2) sed - How to search between two patterns:

sed -n '/start-pattern/,/end-pattern/p' filename

This is useful when you want to limit your search to a region within a file


e.g Between two time points

sed -n '/01:44:39/,/02:41:44/p' abc.log


3) sed - how to prefix/suffic something to the start/end of every line

You know this well if you are exposed to regular expression (makes way for some most powerful text manipulations).

^ - Denotes beginning
$ - Denotes ending

e.g Comment out some lines in a config file

sed -i 's/^/#/g' filename

e.g Add some comments to every line at the end

sed -i 's/$/<your text>/g' filename


4) grep multiple strings

grep 'warning\|error\|critical' /var/log/messages


5) grep and display few lines above the matched pattern

grep -A  2 'warning\|error\|critical' /var/log/messages


6) grep and display few lines below the matched pattern

grep -B  2 'warning\|error\|critical' /var/log/messages

Tuesday, April 16, 2013

Drive to Coonoor


Last week, we drove to Coonoor via Mysore,Gundalpet,Mudumalai National Park and Mashinagudi...Stay at YWCA Coonoor was a very pleasant experience as this holiday home was located away from the Coonoor town overlooking the nearby valley...Certainly looks like more than a century old, this colonial bungalow had the charm that is hard to find in modern hotels loaded with luxuries...I particularly liked this place for the fact that they don't (pseudo?) pamper you much as done at other places but attend to your needs in a simple manner...Most importantly, the food was prepared as per the request and served at the ground floor common hall...

We got a room at the first floor...waking up in the morning upon the chirping sound of birds and sipping the hot coffee served at the room with the view of gracious Nilgiri mountain up and the expanding valley down were joy compared to our daily rut life at Bangalore.

Drove around Coonoor and visited Dolphin's nose and Lamb's rock..Eesha had a horse ride at Dolphin's nose. After visiting Sim's park, we heeded to the suggestion of one local street side toy vendor and visited High Field tea factory to buy some spices...While we bought some spices, I must say the Green tea was bit too expensive and luckily overcame that compulsive desire to buy...Little later, bought some decent tea at a wholesale store at Coonoor town and the price was like half compared to High Field factory shop...
It was getting dark when we got there at High Field tea factory and the valley view from the shop was really stunning..Seems like it was popular shooting destination and apparently, hindi movie Raja Hindustani was shot there ;-)

Before leaving Coonoor, visited Needle Craft, an boutique selling hand embroidered linen and cotton clothes,bed sheets,cushion covers etc Rekha bought 50 gms garam masala (Rs250...it better be good..chicken would cost less than this masala)...and one frock for Eesha...Overall, it was not quite compelling buy although we bought something because of our predisposition...Nevertheless, I must say that we witnessed ourselves in a British-built Victorian villa that was tucked inside such a gorgeous surrounding...Just google Erin Villa Coonoor for pictures...

Saturday morning, we checked out and started heading back to Bangalore...Stopped at Ooty for quick snack at Virtue Bakery and some carrots and broccoli on Charring Cross...The trip was over except for the drive back home...Vacation is always shorter than you wish ;-)

Check out some of the photos @ 
Trip to Coonoor Apr 2013

Friday, March 8, 2013

Condensed Wealth of Nations - Quick read

Recently, came across this...condensed version of "Wealth of Nations by Adam Smith"...I have been eager to read this book but the original volume is pretty huge and the language used by Smith is also not too trivial especially for a person like me who has no formal background in economic science..I downloaded this at once and was pleasantly surprised to find that the condensed version is around 75 pages ;-) written in modern English language.

It was a pretty good read as anticipated and gave me a gist of his views on trade,commerce and public policy...Considering the fact that Smith wrote this in eighteenth century and his words and wisdom constitute the basis for the economic science today, two centuries later, is truly ground breaking and make Smith one of the most influential original thinkers.

Reading about the concepts of money in terms of use value and exchange value were interesting...The key message here was that money is a just medium of exchange and by itself has no value. The true value of money lies in what it can buy...so true...Had a chance to understand the diamond-water value paradox better..When water is so important to survival and diamond is not, why is it that diamond has such enormous value compared to value of water...

Apparently, the author of this condensed version clarifies the reason why Smith concluded on some answers other than marginal utility theory...This is one of the other advantages of this condensed version that it outlines the original thoughts of Smith as it was written and explains them in modern language avoiding the chance for misinterpretation...Great initiative by the author...

This book is freely available at www.adamsmith.org/ 

Sunday, February 24, 2013

Eesha - Annual Day @ Little Elly Nursery


Eesha had been practicing dance steps for Annul Day celebration for the last couple of weeks..the song is My heart goes sha la la la from Venga boys album...At the function yesterday, Eesha entered from back stage to the dance floor looking for both of us with tears in her eyes...Once reached the floor, she and her partner (I think his name is Kevin) were standing still with hand-in-hand raising my hope that she will start moving legs to the song...but in the next moment, Eesha bursted out into crying and ran towards her teacher...Dance performance of all the kids was pretty good..There was one kid from Eesha's nursery class who refused to leave the dance floor ;-)...It was a great sight to see her enthusiasm and total oblivion to the world around...

After cajoling Eesha to remain calm with multiple offers, we were leaving the function for lunch out and they started playing Gangnam style and to our pleasant surprise, Eesha came back to jubilant mood and made some moves ;-)

Shared some of the photos and video @ Nursery Annual Day @ Manipal County...

Thursday, February 21, 2013

tar creation with option C and effect of globbing



There was a need to archive some logs for investigation...
Without much thought, I fire this command and there it was..bummer!!


[root@mysys rmlater]# tar -zcvf /var/tmp/test.tgz -C /root/myapp/log/ 
appProc.log.*
tar: appProc.log.*: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors


[root@mysys rmlater]# ll /root/myapp/log/appProc.log.*
-rw-r--r-- 1 root root 338928 Feb 22 10:47 /root/myapp/log/appProc.log.0
-rw-r--r-- 1 root root 460000 Feb 20 22:40 /root/myapp/log/appProc.log.1
-rw-r--r-- 1 root root 460000 Feb 18 21:39 /root/myapp/log/appProc.log.2
-rw-r--r-- 1 root root 462685 Feb 16 20:38 /root/myapp/log/appProc.log.3
-rw-r--r-- 1 root root 907643 Feb 14 20:29 /root/myapp/log/appProc.log.4

[root@mysys rmlater]# pwd
/var/tmp/rmlater

Solution 1:
tar -zcvf /var/tmp/test.tgz /root/myapp/log/appProc.log.*

Solution 2:
cd /root/myapp/log/; tar -zcvf /var/tmp/test.tgz appProc.log.*

Difference between Solution 1 and Solution 2:
1) The files are archived in package structure opt/cpf/oma/esymacstarter/. You will see the 

appProc.log.* under opt/cpf/oma/esymacstarter/ when you extract the test.tgz

2) The files are archived into test.tgz without any package structure

Now looking at the error:
tar: appProc.log.*: Cannot stat: No such file or directory

tar -C option => Instructs tar to change the working directory and perform archiving

Reason why it failed: Due to the wildcard pattern and how it is interpreted by shell
Shell expands the files into matching files as per the wild card pattern. This operation is 
called "globbing"...

When shell does globbing, it does so from the current working directory - It checks for 
files matching "appProc.log.*" in /var/tmp/rmlater

[root@mysys rmlater]# ll
total 0
-rw-r----- 1 root root 0 Feb 22 11:25 opt


No files matching appProc.log.* => Cannot stat: No such file or directory

Why use -C option then:

It comes handy when when you want to go to multiple directories and archive different files from them. Most importantly, when you want to put them into one tgz file!!

One use case I can think of is collecting logs for different SW modules from more than one 
folder. In case you want to explore tar options in detail, check out this excellent resource GNU tar manual

Tuesday, February 19, 2013

Visited Eesha's school

Last weekend on Saturday 16th Feb, we visited Eesha's (my daughter ;-) ) school to participate in the parent enrichment programme. It was a two hours session on the power of concentration and the numerous ways to help engage the child into developing this faculty. This was the second session that we attended and it gave me a glimpse of their approach towards education. I'm quite happy about the fact that Eesha will start her education journey at such school...More info about the session here