[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel 2.4.x compiling in Woody traced to Makefile+bash

On Mon, Dec 03, 2001 at 03:13:20PM -0600, Donald J Bindner wrote:

> More /bin/sh fun!  Note, my prompt here is the present working
> directory:
> /usr# /bin/bash
> /usr# cd ..
> /# cd usr
> /usr#
> /usr# /bin/sh
> /usr# cd ..
> /# cd usr
> sh: cd: usr: No such file or directory
> It would seem that /bin/sh could not cd to directories at all
> because I had a CDPATH set.

This is expected behavior.  If you want to search the current directory in
addition to the directories in CDPATH, add an empty entry in the proper
location, e.g.:


to search the current directory first,



When run as bash, bash will implicitly do this for you.  This is a
POSIX-incompatible extension, which is why it does not happen when bash is
called as /bin/sh.  See (bash)Bash POSIX Mode.

 - mdz (+2 points for blaming the environment)

Reply to: