Dharmastala – Where you see yourself

Hi friends,

Its my grandma’s wish, that I should wipe my hair to god Manjunatha, who is there in dharmastala. My family planning to go and finish the pilgrimage, but time didn’t allowed us, last week, we finally decided and started our journey.

Last Wednesday morning 3.30 am, we started, but there is no bus to banglore from my village pallikonda until 5.00 am.(Actually every bus to Bangalore will cross my village). So we went to Vellore and the boarded bus to Bangalore. Afternoon 11.55, we reached majestic.

The we had lunch, then we boarded ‘Dharmastala’ but at 1.00 pm, after a long journey, we reached ‘hassan’ at 5.45 pm, ‘hassan’ is a beautiful and well planned city, which is center to mangaluru and Bengaluru(sorry, Bangalore was changed to bengaluru). The real journey started after ‘hassan’, full of forest, full of waterfalls and kerala style houses gives so much pleasure to our eyes.

Also the way the drivers drive the bus is simply fantastic, my dirver constantly driving the bus with 60km even in the danger curves, I really enjoyed his driving. If you wana roller coster ride, go to ‘dharmastala’, you will definitely enjoy the bus ride.

We reached that beautiful temple at 9.55 pm, then as usual, I booked a dharma room and we had dinner there. Morning 4.00 am, me and my father went to wipe my hair, it took nearly 3 hours to finish that proccess. Then our family went inside temple at 9.30 am, and came out 11.45 am. Then we went to ‘Dharma Saapadu’, means afternoon meals. Its just rice with ‘rasam’, but it tasts like ‘amirdham’. I already know about the afternoon meals, but I felt the sweetness of the meals at realtime. It was simply superb.

We started our return at 2.00 pm afternoon, and reached home at 4.00 am. All in all, it was a beautiful time, I spend with my family, after my college studies.

UTF-8 codes in Terminal

Hi friends,

Last week is fantastic for me, hope you also enjoyed your previous week. Sometimes I realize that, reading ‘man’ pages and html pages in ‘/usr/share/doc’ gives us more information, that we never get from ‘google’. Last Saturday, I read ‘utf8’, ‘Unicode’ and ‘console_codes’ man pages one more time to refresh my mind. Also I came up with two scripts which will do some quick works converting tagged unicodes to ‘utf8’ codes and it will display it in terminal. These script only works if you have ‘/usr/share/i18n/charmaps/UTF-8.gz’ file. Here is the scripts.



BUFFER=`echo "${BUFFER}" | tr '[a-z]' '[A-Z]'`
BUFFER=`echo "${BUFFER}" | tr '\n' ' '`
BUFFER=`echo "${BUFFER}" | tr '\t' ' '`
BUFFER=`echo "${BUFFER}" | tr -s ' '`
BUFFER=`echo "${BUFFER}" | sed -e 's/>/> /g'`

	UTF8BUFFER="${UTF8BUFFER}"`gunzip -c "${UTF8FILE}" | 
	grep "${UNICODE}" |
	awk '{print $2;}'` 

echo -e "\x1b%G${UTF8BUFFER//\//\\}\x1b%@"

This script will take taged Unicode as standard input and display the resolved glyph in standard output. Here is an example screenshot.

unicode2utf8.bash script output
unicode2utf8.bash script output



	LANGUAGE=`echo "${LANGUAGE}" | tr '[a-z]' '[A-Z]'`

	gunzip -c "${UTF8FILE}" |
	awk "\$3 ~ /${LANGUAGE}/{print \$0;}" | 
			echo -n -e "${UNICODE}\t"
			echo -n -e "\x1b%G${UTF8CODE//\//\\}\x1b%@"
			echo -e "\t${DESCRIPTION}"

This script will be very interesting to you. If you give a grep pattern matching your language, say ‘tam’ for tamil, this script will fetch all the unicode details about the whole language. Take a look at the screenshot.

unicodes.bash script output
unicodes.bash script output

I actually intend to write my own algorithm to convert unicode to utf8, but I’m started learning one art called ‘don’t invent the wheel again’. So I used that file to convert unicode to utf8.

And one more thing, there is a quick way you can type your language characters in console using ‘CTRL+SHIFT+U’ then giving unicode. For example,

‘CTRL+SHIFT+U0B85’ will display ‘அ’ in console.

attachlicense – script to add license into the source files

Hello mates,

Its has been some kind of twisted weekend to me, Not enough time to post, But I got some time with my lappy to create a script which will automatically add my license text,  Yes, its like the previous post, but this one is a bash script, instead of vi script(Ooh, its a damn interesting to do vi scripting.. defenately I’ll try something new with it).

Here is the script,


And here is my customized gplv2,

* <description>
* Copyright (C) <year>  <name> <email>   
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see .

This script will not attach if it see a keyword already present in the source file, so forgive me to put this stupidity in place, I just wrote it for no purpose, I need to update this script to do more, but don’t have enough time to do it. To attach the license to a list of .c and .h files, all you need to do is,

$ find "${MYDEVDIR}" -name '*.c' -o -name '*.h' | xargs attachlicense -f gplv2.txt -n 'Mohan Raman' -e 'mohan43u@gmail.com' -w -v  

I just showed only two options, there is more options to customize,

Finally, its just for fun script, and not yet fully completed, so please don’t try this with production sources, also if you have suggessions, let me know.