changing dir inside shell

Ron Natalie ron at topaz.rutgers.edu
Wed Jul 27 05:39:09 AEST 1988


You can't.  Directory changing is a per process thing.
A cd in a shell file will only change the directory for
the duration of that shell file.  You need to get the
cd interpreted by the interactive shell.  Assuming you
have a 5R2 or later Bourne Shell, try something like
this:

mover() {
 cp *.me /usr/tmp
 cd /usr/tmp 
}



More information about the Comp.unix.questions mailing list