By default the shell runs your script in a shell which is different from the shell you logged in . So when the script exits , you come back to your own shell ,hence the old working directory .
To make the change permanent you need to run your script in the same shell as you have logged in . To do so precede your invocation script with a "." (dot) , to specify the same shell . This will change to the directory you want .
e.g $ . <myscript.sh> instead of $<myscript.sh>
Let me know if that works
Thanks for letting me know . Guess I forgot to say that explicitly . There should be a space between the dot and the script name e.g
$. myscript.sh . This will tell the Shell to run the script under the same shell .