Public bug reported:

Binary package hint: dash


This script:

cnt=6
while [ $((cnt = cnt - 1)) -gt 0 ]; do
    echo $cnt
done

Is not parsed. Expansion and assignment in shell arithmetic appear to be
mandated by the POSIX standard.

http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_04

"All changes to variables in an arithmetic expression shall be in effect
after the arithmetic expansion, as in the parameter expansion
"${x=value}".

If the shell variable x contains a value that forms a valid integer
constant, then the arithmetic expansions "$((x))" and "$(($x))" shall
return the same value."

** Affects: dash (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
dash does not parse valid POSIX arithmetic
https://launchpad.net/bugs/92189

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to