#! /bin/bash
set -x
set -e
set -u
idx=0
((idx++))
echo "rval: $?"
echo "idx: $idx"
root@pe-centos5:/vagrant/bin# ./test
+ set -e
+ set -u
+ idx=0
+ (( idx++ ))
+ echo 'rval: 1'
rval: 1
+ echo 'idx: 1'
idx: 1
root@pe-ubuntu-lucid:/vagrant/bin# ./test ; echo $?
+ set -e
+ set -u
+ idx=0
+ (( idx++ ))
1