if判断

1、if基本范例

if [ `netstat -lntup|grep nginx|wc -l` -lt 1 ];then   
    echo "nginx service is ok!"
else
    echo "nginx service is error!"
fi

 

posted @ 2018-01-26 12:38  小马哥79  阅读(23)  评论(0)    收藏  举报