Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!lvc From: lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) Newsgroups: comp.unix.questions Subject: gettings child proc. cd's back to parent proc. Keywords: function,shell Message-ID: <12075@tut.cis.ohio-state.edu> Date: 30 Apr 88 12:29:51 GMT Organization: Ohio State Computer & Info Science Lines: 33 Someone asked how to get a parent process to change directory when the child process did it. This might have nothing to do with what you want but maybe someone will find this useful ... If you are talking about shell scripts you could try to use a shell *function* instead. Shell functions are in ksh and System V sh. I don't know about csh. Here is one of my favorite shell functions, it makes a directory and cd's to it all at once. Put this in your sh .profile or ksh ENV file: mc() { case ${#} in 1 ) /bin/mkdir ${1} && "cd" ${1} && echo $PWD ;; * ) echo "usage: ${0} directory" >&2 return 1 ;; esac } To use it, just say: mc dirname and voila! you have a new directory called dirname and you're there. -- Larry Cipriani, AT&T Network Systems and Ohio State University Domain: lvc@tut.cis.ohio-state.edu Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (weird but right)