解答网友shell问题一例20140702
时间:2014-08-27 18:38 来源:linux.it.net.cn 作者:it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[root@oldboy ~]# cat oldboytest.sh
#!/bin/sh
stra='aa'
strb='bb'
if [ "$stra" == "aa" -a "$strb" == "bb" ];then
echo "true"
else
echo "false"
fi
if [[ "$stra" == "aa" && "$strb" == "cc" ]];then
echo "true"
else
echo "false"
fi
[root@oldboy ~]# sh oldboytest.sh
true
false
(责任编辑:IT)
|

