bash increase and add another value to variable code example
Example 1: increment number bash
i=$((i+1))
((i=i+1))
let "i=i+1"
Example 2: zsh increment variable
i=0
echo $i
(( i+=1 ))
echo $i
i=$((i+1))
((i=i+1))
let "i=i+1"
i=0
echo $i
(( i+=1 ))
echo $i