Basic question on shell

From: Kumar, Praveen (cahoot) (Praveen.Kumar@CAHOOT.COM)
Date: Tue May 04 2004 - 04:20:20 EDT


Hello,
           when i execute a script that contains only one line "cd /home",
the script executes and comes back to my current directory. I understand
that the cd is being executed in the sub shell that is being spawned while
executing the script. But in my initial days of unix admin i remember that
after i have executed the script, i used to see that my current directory is
not same as that of directory i was in while executing the script. Instead
the directory used to be the directory that i have changed in the script.

I know that this is a silly question but somehow it's not striking me now.

TIA
Praveen.K

*********************
Internet communications are not necessarily secure and may be intercepted or
changed after they are sent. cahoot does not accept liability for any such
changes.
If you wish to confirm the origin or content of this communication, please
contact the sender using an alternative means of communication.

This communication does not create or modify any contract.

This email may contain confidential information intended solely for use by
the addressee. If you are not the intended recipient of this communication
you should destroy it without copying, disclosing or otherwise using its
contents.

Please notify the sender immediately of the error.

cahoot is a division of Abbey National plc.
Abbey National plc is registered in England, registered number 2294747.
Registered Office: Abbey National House, 2 Triton Square, Regent's Place,
London, NW1 3AN.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:53 EDT