August, 2014
การบวกเลขใน Shell Script
-i กำหนดตัวแปรป็น integer #!/bin/bash # set x,y and z to an integer data type declare -i x=10 declare -i y=10 declare -i z=0 z=$(( x + y )) echo “$x + $y = $z”
Off
16
Aug
-i กำหนดตัวแปรป็น integer #!/bin/bash # set x,y and z to an integer data type declare -i x=10 declare -i y=10 declare -i z=0 z=$(( x + y )) echo “$x + $y = $z”