[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wrong logical evaluation of expressions involving true or false commands
From: |
Miguel Ángel |
Subject: |
wrong logical evaluation of expressions involving true or false commands |
Date: |
Sun, 24 Jun 2007 17:15:06 +0200 |
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='p$
uname output: Linux hal 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007
i686 GNU/Linux
Machine Type: i486-pc-linux-gnu
Bash Version: 3.2
Patch Level: 13
Release Status: release
Description:
Evaluating expressions like:
[ true -a false ] ; echo $?
always returns 0 (true), doesn't mind if I change true for false or
viceversa.
Repeat-By:
any expression wich involves the true or false commands throws wrong
results.
Examples:
[ "a" = "a" -a false ] ; echo $?
gives 0 (true)
Thank's in advance.
--
sLap
- wrong logical evaluation of expressions involving true or false commands,
Miguel Ángel <=