Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!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: <13146@smoke.BRL.MIL> Date: 17 Jun 90 22:23:01 GMT References: <5672@aplcen.apl.jhu.edu> <13121@smoke.BRL.MIL> <111@npdiss1.StPaul.NCR.COM> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <111@npdiss1.StPaul.NCR.COM> mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) writes: >There are two ways of executing a Bourne shell script There is a third way, which is the one that is relevant here -- the shell automatically sources the script. This is always done for ~/.profile in a login shell and may also be done for some enhanced shells on a per-interactive-shell basis. These scripts are supposed to be executed in the current context of the shell, so their effects are supposed to stick.