|
发表于 2005-6-20 23:56:13
|
显示全部楼层
Post by txkss
[root@localhost root]# test "$one" != "$two"
[root@localhost root]# echo $?
0
上面这样符号表示法就可以表示不等一于
而下面就不行了这是为什么呢?
[root@localhost root]# test "$one" !-eq "$two"
-bash: !-eq: event not found
[root@localhost root]# test "$one" ! -eq "$two"
-bash: test: too many arguments
shell中-eq,-ne,...是数值比较符号,不可用于chars... |
|