RosettaCodeData/Task/Increment-a-numerical-string/UNIX-Shell/increment-a-numerical-string-2.sh
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

7 lines
258 B
Bash

num=5
let num=num+1 # Increment the number
let "num = num + 1" # Increment again. (We can use spaces inside quotes)
((num = num + 1)) # This time we use doublebrackets
let num+=1 # This time we use +=
let "num += 1"
((num += 1))