set path using a shell program

Hello sir,
I am using a fedora 9 system.
I wanted to update the path to include the $HOME into the path.
So what we do is :

This will update the path.
I want to do the same thing by writing it in a shell prgram.
I wrote the above code in an "a.sh" file and executed it using "bash a.sh".BUt this did not update the path.
Why did it happen so :confused:

You have to execute like this
. scriptname