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
if 语句语法格式:bash
if condition then command1 command2 ... commandN fi
if [ $(ps -ef | grep -c "ssh") -gt 1 ]; then echo "true"; fi
末尾的fi就是if倒过来拼写,后面还会遇到相似的。ssh