Hello Sanjib, Since Myles has already answered your question to some extent, I would like to take the liberty to point out that your current issue is off-topic on this list.
I would advise you try to ask this on the Ubuntu list (since you use Ubuntu), or post on <help-b...@gnu.org> (a dedicated bash help list). Apart from this, if you prefer web interfaces over email, you could post your question on superuser.com, a member of the stackexchange network. Hope this helps, -- Suvayu Open source is the future. It sets us free.