Re: Basic question on shell

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


Thanx simon and i could actually recollect that i used to use . only

-----Original Message-----
From: Green, Simon [mailto:Simon.Green@EU.ALTRIA.COM]
Sent: 04 May 2004 10:38
To: aix-l@Princeton.EDU
Subject: Re: Basic question on shell

Your memory is at fault. However, you can do this if you execute the script
in the same shell, by sticking a dot in front of it.
e.g. > . your_script
This is often used for setting environment variables.

--
Simon Green
Altria ITSC Europe Ltd
AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html
New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.
> -----Original Message-----
> From: Kumar, Praveen (cahoot) [mailto:Praveen.Kumar@CAHOOT.COM]
> Sent: 04 May 2004 09:20
> To: aix-l@Princeton.EDU
> Subject: Basic question on shell
>
>
> 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.
.sophos.3.80.05.03.
*********************
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