Package: bash
Version: 3.2-4

There were no problems while comparing any numbers in scripts while this 
version of bash. But...

Here is the console:
=========quote========
k...@fish-eye:~$ if (( 06 > 06 )); then echo lazhaa; fi
k...@fish-eye:~$ if (( 07 > 06 )); then echo lazhaa; fi
lazhaa
k...@fish-eye:~$ if (( 07 > 07 )); then echo lazhaa; fi
k...@fish-eye:~$ if (( 08 > 07 )); then echo lazhaa; fi
bash: ((: 08: value too great for base (error token is "08")
k...@fish-eye:~$ if (( 09 > 08 )); then echo lazhaa; fi
bash: ((: 09: value too great for base (error token is "09")
k...@fish-eye:~$     
========endquote=======

As you can see, everything is OK while numbers in brackets are 7 and less. But 
if one of them are 8 and more, there is an error "value too great for base".

The same error is produced by any shell script like this :
=======quote=script.sh===========
#! /bin/bash
trash="08"
lazhaa="09"
if (( lazhaa > trash )); then echo lazhaa; fi
if (( $lazhaa > $trash)); then echo lazhaa; fi
=======endquote===============

output:
=======quote===========
./script.sh: line 4: ((: 09: value too great for base (error token is "09")
./script.sh: line 5: ((: 09: value too great for base (error token is "09")
=======endquote=========

This behaviour is discovered only when numbers are with leading zeros. That is
======quote===========
k...@fish-eye:~$ if (( 9 > 8 )); then echo lazhaa; fi
lazhaa
k...@fish-eye:~$
======endquote========
works as it must.

There were no such behaviour in previous versions of bash.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to