((...))
Jump to navigation
Jump to search
Internal
- Bash Concepts
- Numbers and Arithmetic in bash
- [[Bash_%2B%3D_and_-%3D#Internal}|+= and -=]]
Increment an Integer
local i=0
((i++))
Decrement an Integer
local i=1
((i--))
Organizatorium
Display the value of the variable, then increment it:
i=0
echo $((i++))
echo ${i}
displays:
0
1
Increment the value of a variable, then display t:
i=0
echo $((++i))
echo ${i}
displays:
1
1