[root@BT ~]# [ -f "$file" ]&&echo 1||echo 0 #文件不存在0
0
[root@BT ~]# [ -f $file ]&&echo 1||echo 0 #文件不存在结果还是1 所以加上""
1
[root@BT ~]# [ -f "$file" ]&&echo 1||echo 0
0
[root@BT ~]# [ -f "$file" ]||echo 0 #如果不存在echo0
0
嗯嗯
[root@BT ~]# [ -f "$file" ]&&echo 1||echo 0 #文件不存在0
0
[root@BT ~]# [ -f $file ]&&echo 1||echo 0 #文件不存在结果还是1 所以加上""
1
[root@BT ~]# [ -f "$file" ]&&echo 1||echo 0
0
[root@BT ~]# [ -f "$file" ]||echo 0 #如果不存在echo0
0
嗯嗯