Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.1
Patch Level: 2
Release Status: release
Description:
[Detailed description of the problem, suggestion, or complaint.]
If I use set -e to make my scripts exit on error, the scripts fail if I
use something like:
count=0
((count++))
Repeat-By:
andy:~$ count=0
andy:~$ ((count++))
andy:~$ echo $?
1
andy:~$ ((count++))
andy:~$ echo $?
0
Fix:
This isn't a fix but I can work around this bug if I use ((++count))
andy:~$ count=0
andy:~$ ((++count))
andy:~$ echo $?
0
andy:~$