Archive for the ‘Uncategorized’ Category

I was surfing the web today here and there when suddenly I stumbled upon a page in The Geek Stuff which explained a shell command called awk. It’s a great tool to search through a text file for a pattern. The site contained many easy to understand examples on the usage of awk. The basic […]

Okay, it’s the election time here in Sri Lanka. The presidential election will be held on 26th January 2010. As the heat continue to build, I thought of writing a small script to get to know who will win the election as people think. To make it more user friendly, had to add some GUI […]

The editor I use for bash scripting is the VI editor. In fact it is VIM, or Vi IMproved. The other options include gedit, nano and emacs. Any text editor will do the job. You can invoke VI by typing vi in the shell. vi or you can use it followed by the name of […]

Remember the bash script I wrote in the previous post? Well, the script below does the exactly opposite. #!/bin/bash #: Description : Reads from a file whose entries are of theĀ  format “name1 name2, age” and writes them in a file line by line #: Author : Thameera #: Date : 26/12/2009 while IFS= read […]

This is a script I wrote to get in touch with some bash basics. #!/bin/bash #: Description : Reads a file with entries in separated lines and write them to a file with a comma separated format #: Author : Thameera #: Date : 23/12/2009 while IFS= read -r name1 do read -r name2 read […]



Hello there! This is Thameera, a student from Sri Lanka. I had this strange interest in learning shell scripting and have just begun learning it. In this blog, I’ll post the various bash scripts I write in the time to come, hopefully with explanations. Keep in touch!