Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!noose.ecn.purdue.edu!mentor.cc.purdue.edu!sage.cc.purdue.edu!asg From: asg@sage.cc.purdue.edu (Bruce Varney) Newsgroups: comp.unix.shell Subject: Re: Help with this script Message-ID: <10051@mentor.cc.purdue.edu> Date: 10 Apr 91 22:08:11 GMT References: <1991Apr9.164257.9128@agate.berkeley.edu> <1991Apr9.175008.12044@leland.Stanford.EDU> <1991Apr10.140153.480@cca.vu.nl> Sender: news@mentor.cc.purdue.edu Reply-To: asg@sage.cc.purdue.edu (Bruce Varney) Organization: Purdue University Lines: 31 In article <1991Apr10.140153.480@cca.vu.nl> hendrik@cca.vu.nl (Hendrik te Winkel) writes: }rgupta@leland.Stanford.EDU (Rajesh Gupta) writes: } }>> }>>Hi, }>>I'm trying to write a script to emulate the DOS Norton Utilities "ncd" }>>accomplishes that job. Unfortunately, when the shell is exited it }>>returns the user to the directory from which it was called. Does anyone }>How about: } }> cd `find . -name -type d -print` }>This should do the job. } }Not really, again when you put this into a file it will change your }directory but after the filescript finishes you'll discover }that you are again in the original directory. }Of course you could alias it in csh. }But now some real answer from a guru please! Is it really impossible }to change your working dir with a shell script _and_ to remain there }after it is finished? I don't know how to do it. Please inform. }Hendrik Why do you wnant to do it in a shell script????????? Try using the CDPATH (or cdpath for csh junkies) variable. --------- ### ## Courtesy of Bruce Varney ### # aka -> The Grand Master # asg@sage.cc.purdue.edu ### ##### # PUCC ### # ;-) # # ;'> # ##