From: Green, Simon (Simon.Green@EU.ALTRIA.COM)
Date: Tue May 04 2004 - 05:37:56 EDT
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.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:53 EDT