shell中的if-then語句

shell 中的if-then語句的結構爲:web 單條件 #if標誌開始,當if後命令的返回碼爲0時執行then後的語句 if commands then commands #注意還有結尾,標誌最近的一個if的結束 fi 例如:shell #!/bin/bash #test if-then if date then who fi #who執行成功,返回碼爲0,結果爲: 2
相關文章
相關標籤/搜索