Recently I started with writing some shell. I want to increment a local var
$COUNTER but I am not sure which and why should I use.
COUNTER=`expr $COUNTER + 1` COUNTER=$((COUNTER+1))
The first one some how works only sometimes, the second works always. Why is that? Why do I need double parenthesis in the second?