变量可以不用$吗?5451vs5451 写了:这么写是不对的,请看下面的例子:Robinho 写了:也可以使用双圆括号结构
if (( $1 == "yes" ))代码: 全选
$ a=no; if (( a == "no" )); then echo yes; else echo no; fi yes $ a=no; if (( a == "yes" )); then echo yes; else echo no; fi yes $ a=no; if (( a == 0 )); then echo yes; else echo no; fi yes $ a=no; if (( a == 1 )); then echo yes; else echo no; fi no
高手看过来
-
- 帖子: 849
- 注册时间: 2006-09-07 22:51
- 联系: