Shell腳本條件判斷和循環語句

 

if else

if

if 語句語法格式:bash

if condition
then
    command1 
    command2
    ...
    commandN 
fi
if [ $(ps -ef | grep -c "ssh") -gt 1 ]; then echo "true"; fi

末尾的fi就是if倒過來拼寫,後面還會遇到相似的。ssh

相關文章
相關標籤/搜索