Path: utzoo!censor!geac!jtsv16!uunet!crdgw1!sungod!davidsen From: davidsen@sungod.crd.ge.com (William Davidsen) Newsgroups: comp.unix.questions Subject: Re: Changing Directory Keywords: cd Message-ID: <1457@crdgw1.crd.ge.com> Date: 2 Aug 89 18:30:03 GMT References: <5068@mtuxo.att.com> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Distribution: usa Organization: General Electric Corp. R&D, Schenectady, NY Lines: 14 Your shell probably has CDPATH, so you can put the pathname-1 there. You can also define a symbol at startup: foo=/big/long/ugly/path cd $foo You need to execute the script in the current shell rather than a subshell, so the . command is used in shell. $ cat foo cd /big/local/ugly/path # this is the script $ . foo # this will do what you want QED bill davidsen (davidsen@crdos1.crd.GE.COM) {uunet | philabs}!crdgw1!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me