changing dir inside shell

Torsten Homeyer torsten at pcsbst.UUCP
Thu Jul 28 18:38:29 AEST 1988


In article <47800013 at uxe.cso.uiuc.edu< bianco at uxe.cso.uiuc.edu writes:
<
<I have the following in a file called 'mover':
< cp *.me /usr/tmp
< cd /usr/tmp 
<Upon entering 'sh mover' the files are copied, and the directory is
<changed, however the shell is then exited and the current directory
<is changed back to my home directory. How can I cause the shell to exit
<in the directory I changed to ? 

	Try the shells dot-command:

	$ . mover

	Then all commands in your script will be interpreted by your current
	shell, without forking another shell to interpret your commnd file.

		Torsten.



More information about the Comp.unix.questions mailing list