From: jar
To: bug-bash@gnu.org,b...@packages.debian.org
Subject: numerical comparison missing in bash and expr

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-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -Wdate-time 
-D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/bash-N2nMjo/bash-4.4.18=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall 
-Wno-parentheses -Wno-format-security
uname output: Linux rrl 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 
UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.4
Patch Level: 20
Release Status: release

Description:
        all numerical tests using -ne, -lt, -le, -gt, or -ge fail. It appears 
that only string comparison is used. 

Repeat-By:
# the following two lines work  
[ 5 < 10 ] && echo true || echo false
[ 5 > 10 ] && echo true || echo false
# the next three lines fail
n=5
[ $n < 10 ] && echo true || echo false
[ $n > 10 ] && echo true || echo false


Fix:
        [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