shell/基本脚本/使用方括号执行数学运算.sh

8 lines
102 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
var1=10
var2=50
var3=45
var4=$[$var1 * ($var2 - $var3)]
echo 'The final result is '$var4