prompt question
Bruce Barnett
barnett at grymoire.crd.ge.com
Tue Feb 12 01:23:27 AEST 1991
In article <1991Feb8.003607.10413 at odin.corp.sgi.com> erik at 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 at 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 at crd.ge.com uunet!crdgw1!barnett
More information about the Comp.unix.misc
mailing list