标签:down null ... text ash The done one $?
#!/bin/bash ping -c1 -W1 $ip &>/dev/null
if [ $? -eq 0 ];then
echo "$ip is up.."
continue
fi
}
while read ip
do
ping_success
ping_success
ping_success
echo "$ip is down..."
done <ip.text
标签:down null ... text ash The done one $?
原文地址:https://blog.51cto.com/5776643/2385453