linuxSHELL學習之數字比較、字符串比較

一、testshell test提供一種檢測if-then語句中不一樣條件的方法,若是test命令中列出的條件評估值爲true,test 命令以0 推出狀態碼退出。 if test condition then    commands fi test命令提供3類條件的評估:數值比較、字符比較、文件比較 數值比較: n1 -eq n2檢查n1是否等於n2         n1 -le n2檢查n1是
相關文章
相關標籤/搜索