Xref: utzoo comp.unix.misc:963 comp.windows.misc:1818 Path: utzoo!mnetor!tmsoft!torsqnt!hybrid!scifi!bywater!uunet!crdgw1!barnett From: barnett@grymoire.crd.ge.com (Bruce Barnett) Newsgroups: comp.unix.misc,comp.windows.misc Subject: Re: prompt question Message-ID: Date: 11 Feb 91 14:23:27 GMT References: <1991Jan23.083259.16296@daimi.aau.dk> <51331@sequent.UUCP> <1991Feb8.003607.10413@odin.corp.sgi.com> Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.ge.com Followup-To: comp.unix.misc Organization: GE Corp. R & D, Schenectady, NY Lines: 19 In-reply-to: erik@westworld.esd.sgi.com's message of 8 Feb 91 00:36:07 GMT In article <1991Feb8.003607.10413@odin.corp.sgi.com> erik@westworld.esd.sgi.com (Erik Fortune) writes: > alias EnterDir 'if (-e "$thisdir/$CDENTER") source $thisdir/$CDENTER' > alias ExitDir 'if (-e "$thisdir/$CDEXIT") source $thisdir/$CDEXIT' de5@ornl.gov (Dave Sill) writes: >I hope you never cd to directories writable by others, at least on >multiuser systems. Easy to fix. Change the "-e file" to a " -f file && -o file ": alias EnterDir 'if ( -f "$thisdir/$CDENTER" && -o "$thisdir/$CDENTER" ) source $thisdir/$CDENTER' alias ExitDir 'if ( -f "$thisdir/$CDEXIT" && -o "$thisdir/$CDEXIT" ) source $thisdir/$CDEXIT' As long as the file isn't group or world writable, that is. -- Bruce G. Barnett barnett@crd.ge.com uunet!crdgw1!barnett