Shell if else語句_Shell中文網 - 西安電子科技大學電子工程學院

Shell if else語句_Shell中文網 - 西安電子科技大學電子工程學院

瀏覽:601
日期:2025-05-02
if 語句通過關係運算符判斷表達式的真假來決定執行哪個分支。Shell 有三種 if ... else 語句: if ... fi 語句; if ... else ... fi 語句; if ... elif ... else ... fi 語句。 1) if ... else 語句 if ... else 語句的語法: if [ expression ] then Statement(s) to be executed if expression is ......看更多