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