数学计算方法
时间:2010-06-29 来源:9ding
1、expr
expr 1 + 5
expr 2 \* 23(\是转义字符)
2、使用括号
test001=$[2 * 3]
echo $test001
脚本qq.sh
#!/bin/bash
#qq.sh by liang
test1=30
test2=50
test3=45
test4=$[$test1 * ($test2 - $test3)]
echo The final result is $test4
#qq.sh by liang
test1=30
test2=50
test3=45
test4=$[$test1 * ($test2 - $test3)]
echo The final result is $test4
相关阅读 更多 +
排行榜 更多 +