[Top][All Lists]

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

Bug with 'test' built-in.

From: John Wenker
Subject: Bug with 'test' built-in.
Date: Wed, 9 Aug 2006 15:03:08 -0700

From: address@hidden
To: address@hidden
Subject: Bug with 'test' built-in.

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-I./include -I./lib -O2 -march=i386 -mcpu=i686
uname output: Linux ragtop 2.4.18-3 #1 Thu Apr 18 07:32:41 EDT 2002 i686 
Machine Type: i686-pc-linux-gnu

Bash Version: 2.05a
Patch Level: 0
Release Status: release

        There is a problem using '!' (boolean negation) with the -a flag
      of the 'test' built-in command.  The following construct
      _always_ evaluates true, regardless of whether the file exists
      or not.

         if [ ! -a file ]; then
            echo "This line always prints no matter what."
            echo "This line never prints."

      Using -a w/o the negation works fine.

        [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]