Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!XAGSUN.EPM.ORNL.GOV!romine From: romine@XAGSUN.EPM.ORNL.GOV Newsgroups: gnu.bash.bug Subject: Re: Flurry of `file not found' messages. Message-ID: <8907102044.AA11531@xagsun.epm.ornl.gov> Date: 10 Jul 89 20:44:39 GMT References: <8907101925.AA29284@aurel.caltech.edu> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 156 Brian, Sorry about the lack of information -- from reading the code, I just assumed that the behavior I get was intentional. I built bash-1.02 with exactly one change (prior to commenting out the line I mentioned), and that was just the MAINTAINER definition. I'm running on a SUN 3/50 with OS 4.0.1. (Note: I'm using gcc-1.35 with -traditional to compile bash.) I have the following environment (using bash as my default shell): xagsun% set _=/usr/spool/mail/romine OLDPWD=/usr/kvm printman={ if [ $# -eq 1 ] ; then if [ -r $1 ] ; then cat $1 | rsh seq psditroff -man - else filenam=`whereis -m $1` ; filenam=$filenam:$ ; if [ -r $filenam ] ; then cat $filenam | rsh seq psditroff -man - else echo "function printman: file not found" fi fi else echo "function usage: printman " fi } print={ for v in $*; do if [ -r $v ] ; then case "$v" in *.ps) cat $v | rsh seq lpr -Plw1 ; shift ;; *.l | *.man | *.[1-8]) cat $v | rsh seq psditroff -man - ; shift ;; *) cat $v | rsh seq enscript -G -fCourier-Bold8 ; shift ;; esac else echo "$v: No such file or directory" fi ; done } man={ if [ -r $1 ] ; then nroff -man $1 | less else /usr/ucb/man $* fi } malias={ for v in $*; do grep $v $HOME/.mailrc ; done } look={ for v in $*; do /usr/bin/look -df $v /usr/sun1/local/src/ispell/web | awk -f /us r/sun1/u0/romine/lib/ispell/expand.new.awk ; done } EUID=337 UID=337 HISTSIZE=500 HISTFILE=/usr/u0/romine/.bash_history BASH_VERSION=1.02 PWD=/usr/dict MAILPATH=/usr/spool/mail/romine MAILCHECK=60 IFS= PS2=bash> BASH=/usr/gnu/bin/bash CDPATH=.:..:~:/usr:/usr/sun1:/usr/sun2:/usr/sun1/u0:/u0:/u1:/u2:/seq0:/ DISPLAY=unix:0.0 FLOAT_OPTION=f68881 HOME=/usr/u0/romine LOGNAME=romine PATH=/usr/u0/romine/bin:/usr/gnu/bin:/usr/ucb:/bin:/usr/bin:/usr/new:/usr/local: /usr/local/bin:/etc:/usr/etc:/usr/tex/bin:/usr/local/X11.2/bin:. PS1=\h% SHELL=/usr/gnu/bin/bash SHLVL=5 TERM=xterm USER=romine auto_resume=1 ignoreeof=1 no_exit_on_failed_exec=1 nolinks=1 TERMCAP=vs|xterm|...(rest deleted for brevity -- see /etc/termcap) WINDOWID=6291465 (Note: the artificially high value of SHLVL is due to exec-ing new versions, but the behavior is reproducible in any case). xagsun% type cd cd is a shell builtin xagsun% cd foobar ./foobar: No such file or directory ../foobar: No such file or directory /usr/u0/romine/foobar: No such file or directory /usr/foobar: No such file or directory /usr/sun1/foobar: No such file or directory /usr/sun2/foobar: No such file or directory /usr/sun1/u0/foobar: No such file or directory /u0/foobar: No such file or directory /u1/foobar: No such file or directory /u2/foobar: No such file or directory /seq0/foobar: No such file or directory /foobar: No such file or directory foobar: No such file or directory foobar: No such file or directory As I mentioned, commenting out the `offending' line of code, as in the following segment from builtin.c does the trick: else { if (chdir (newdir) < 0) { /* * commented out by romine to prevent a flurry of `file not found' * messages when changing to a nonexistent directory, with CDPATH * nonnull * file_error (newdir); */ return (0); } else { return (1); } } } Let me know if there is anything further that I can do to help you. And, by the way, I'm using bash as my default shell, not because I think its buggy, but because it's very well- and carefully-crafted. Thanks for the work you put in. It shows. Chuck Romine romine@msr.epm.ornl.gov (P.S. If it helps, with CDPATH unset, I get two copies of the message, i.e. xagsun% unset CDPATH xagsun% cd foobar foobar: No such file or directory foobar: No such file or directory xagsun%