% uname -a****

Linux dph1d1ods13 2.6.32-279.2.1.el6.x86_64 #1 SMP Thu Jul 5 21:08:58 EDT
2012 x86_64 x86_64 x86_64 GNU/Linux****


% bash --version****

GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)****


The ((i++)) fails only when the result is 1.  When the result is 0 or 2, it
does not fail.  This is a problem when 'set -e'.


### i++ failes when ā€˜I’ becomes one.
i=0
echo $?
0
% (( i++ ))
% echo $?  ### this should not fail
1
% (( i++ ))
% echo $?
0
% (( i++ ))
% echo $?
0

Reply via email to