((...))

From NovaOrdis Knowledge Base
Revision as of 01:43, 14 March 2020 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

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