View Single Post
Posts: 162 | Thanked: 25 times | Joined on Dec 2009
#8
I think your script works just fine :-) Considerthe following variant:

cd /home/user/MyDocs/
pwd

where pwd of course displays the current working directory.

You will see that the script prints '/home/user/MyDocs/', so it executes 'cd' all right.. The unexpected part is that after execution, control returns to the original situation.

Paai