生活如麻 发表于 2018-8-21 09:19:16

Shell 之数学运算

# let x=88+99 && echo $x  
187
  
# let x=88*2 && echo $x
  
176
  
# let x=88-2 && echo $x
  
86
  
# let x=88/2 && echo $x
  
44
  
# let x=88 + 33 && echo $x
  
-bash: let: +: syntax error: operand expected (error token is "+")
  
# let "x=88 + 33" && echo $x
  
121


页: [1]
查看完整版本: Shell 之数学运算