Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!cornell!rochester!pt.cs.cmu.edu!sei!pdb From: pdb@sei.cmu.edu (Patrick Barron) Newsgroups: comp.unix.questions Subject: Re: changing dir inside shell Message-ID: <2949@ci.sei.cmu.edu> Date: 26 Jul 88 17:55:19 GMT References: <47800013@uxe.cso.uiuc.edu> Reply-To: pdb@sei.cmu.edu (Patrick Barron) Organization: Software Engineering Institute, Pittsburgh, PA Lines: 10 In article <47800013@uxe.cso.uiuc.edu> bianco@uxe.cso.uiuc.edu writes: >How can I cause the shell to exit >in the directory I changed to ? Your shell script runs in a child process, and can't affect the state of it's parent (like changing it's working directory). To make this work, you need to execute the shell commands within your top-level shell. Use ". " to do this, or "source " with the C-shell. --Pat.