[Top][All Lists]

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

Problem with if [ -d in bash 4.3.30

From: Olivier TROCHERIE
Subject: Problem with if [ -d in bash 4.3.30
Date: Tue, 9 Dec 2014 14:24:40 +0100

Configuration Information [Automatically generated, do not change]:

Machine: x86_64

OS: linux-gnu

Compiler: gcc

Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/homedir/otrocher/0/0/0/0/0/0/install_bash/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2

uname output: Linux toxcf040 2.6.18-348.el5 #1 SMP Wed Nov 28 21:22:00 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

Machine Type: x86_64-unknown-linux-gnu


Bash Version: 4.3

Patch Level: 30

Release Status: release



            [Detailed description of the problem, suggestion, or complaint.]




I would like to report to you a problem I encounter with bash 4.3.30.

In the following example, VAR is undefined.


With bash 3.2, when I run the following commands:


if [ -d ${VAR:=""} ]


  echo yes


  echo no



I get the no answer (“” is not a directory: correct behaviour).


If I run the same commands with bash 4.3.30, I get the yes answer, which seems to be a bad behavior.

Would it be possible to fix this issue?


Thank you,




            [Describe the sequence of events that causes the problem

            to occur.]



            [Description of how to fix the problem.  If you don't know a

            fix for the problem, don't include this section.]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]