标签:sp on bs as nbsp c ash bash 循环
#!/bin/bash
while [ 1 -eq 1 ] #一直循环
do
ping 192.168.1.116 -c 1|grep -q "time=" #ping通有time= $?=0 不同$?=1
if [ $? -eq 0 ]
then
echo "tong 0"
else
echo " butong 1" # 可以mail邮件通知
fi
done
标签:sp on bs as nbsp c ash bash 循环
原文地址:http://www.cnblogs.com/hanxing/p/4055001.html