RosettaCodeData/Task/Increment-a-numerical-string/UNIX-Shell/increment-a-numerical-strin...

5 lines
165 B
Bash

# All variables are strings within the shell
# Although num look like a number, it is in fact a numerical string
num=5
num=`expr $num + 1` # Increment the number