1、字符串判断
str1 = str2
str1 != str2 当串str1和str
-n str1
-z str1
str1
2、数字的判断
int1 -eq int2 两数
int1 -ne int2 两数
int1 -gt int2 in
int1 -ge int2 in
int1 -lt int2 in
int1 -le int2 in
3 文件的判断
-r file 用
-w file 用
-x file 用
-f file 文
-d file 文
-c file 文
-b file 文
-s file 文
-t file 当
3、复杂逻辑判断
-a 与
-o 或
! 非