计算结果可以用这样的方式,更简洁:
exp="$num1 $op $num2"
result=$(($exp))
echo "the result is: $result"
exp="$num1 $op $num2"
result=$(($exp))
echo "the result is: $result"
2017-11-01