Bash - update value of a variable

15 Oct 2017

Examples how to increment a variable:

var=$((var+1))
((var=var+1))
((var+=1))
((var++))

Or using let

let "var=var+1"
let "var+=1"
let "var++"
[ bash  ]