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

相关文章
相关标签/搜索