Package: dash Version: 0.5.4-7 Severity: minor *** Please type your report below this line *** This bug was found when running the TuxOnIce's "suspend2" script which tries to use dash to evaluate the following arithmetic expression:
if [ $(($code&3)) -eq 3 ] ; then dash reports an error message as follows: 'arithmetic expression: expecting primary: "19&3"' where "19" is the value of $code. It seems dash fails to parse this arithmetic expression when there is *no space* between the operands (ie. $code and 3) and the operator (ie. &) This bug only exists in the compiled "dash" binary distributed within the .deb package. However, recompiling the binary file from the corresponding .deb source files doesn't have this problem. The following simple script could be used to reproduce the problem: #!/bin/dash code=19 if [ $(($code&3)) -eq 3 ] ; then echo "yes!" else echo "no!" fi -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.23-20071222-ibm-t43 (PREEMPT) Locale: LANG=en_US, LC_CTYPE=zh_CN.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages dash depends on: ii libc6 2.7-6 GNU C Library: Shared libraries dash recommends no packages. -- debconf information: dash/sh: false ~ -- Best, Zhaojun (Joseph) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]