Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: 'cd' in shell-script or .profile Keywords: cd - change directory in shell script Message-ID: <13121@smoke.BRL.MIL> Date: 14 Jun 90 19:40:36 GMT References: <5672@aplcen.apl.jhu.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <5672@aplcen.apl.jhu.edu> trweil@aplcen.apl.jhu.edu (Weil Timothy Robert) writes: >results were similar - a 'pwd' would indicate that I'd >changed to the selected directory but UNIX kept me >logged into $HOME....any other tricks to try? A "cd" in a subprocess will not affect the CWD of an ancestral process. However, your .profile is supposed to be executed in the context of the login shell, so a "cd" there should work. In fact, mine does it and it works fine.