Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.questions Subject: Re: Shell variables - help Message-ID: <3007@wyse.wyse.com> Date: 10 Oct 90 21:35:30 GMT References: <1339@ul-cs.ulowell.edu> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 27 In article <1339@ul-cs.ulowell.edu> mchetan@hawk.ulowell.edu (Munisuvratha Chetan) writes: >I have a shell program that sets certain shell variables >according to certain working environment. If I execute this .... >How do I tell the current shell to execute the shell program in >the current shell, and NOT in a new shell ? try using the dot command in sh or source in csh: For sh: . file # the current shell reads file and runs it, # file need not be executable For csh: source file # current shell read and runs file, # also does not need execut permissions In sh (maybe also csh, I do not know), if you are running as root and the root path does not inlcude the current directory (which is good security practice), you will need to use the dot command as follows: . ./file # provides a relative path pointed at the file Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com