changing dir inside shell
Patrick Barron
pdb at sei.cmu.edu
Wed Jul 27 03:55:19 AEST 1988
In article <47800013 at uxe.cso.uiuc.edu> bianco at 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 ". <filename>" to do this, or "source <filename>" with the C-shell.
--Pat.
More information about the Comp.unix.questions
mailing list