linux中shell條件表達式總結

1.字符串比較 ! 取反 -n str     字符串 str 是否不爲空 -z str     字符串 str 是否爲空 str1  = str2     str1是否與 str2 相同 str1 != str2     str1是否與 str2 不一樣 2.數值大小比較 int1 -eq int2     等於 int1 -le  int2     小於等於 int1 -ge int2    
相關文章
相關標籤/搜索