calculate a sum and save to variable bash code example Example: bash sum variable x = 2 y = 2 echo $((x + y))