Red Hat Bugzilla – Bug 78710
intereger comparisons limited by 2^31
Last modified: 2007-04-18 12:48:44 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830
Description of problem:
When using interger tests with bash 2.05a with any number greater than
2147483647 results in an error "integer expression expected"
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Do an interger comparison with numbers larget than 2147483647 on a redhat 7.3
$ [ "2147483648" -eq "2147483648" ] && echo equal
Actual Results: $ [ "2147483648" -eq "2147483648" ] && echo equal
[: 2147483648: integer expression expected
Expected Results: $ [ "2147483648" -eq "2147483648" ] && echo equal
Test this problem against bash 1.14.7 and 2.03.8 on a rh6.2 box as well as 2.05b
on a rh8.0 box and the tests work as expected. Appears to only affect 2.05a.
Upgrading the rh7.3 box to use the 2.05b package from rh8.0 (rebuild from srpm)
fixed the problem.