while ! ping -c 3 192.168.1.1 &>/dev/null
do echo “Ping Fail – `date`”
done
echo “Host Found – `date`”
reference: https://unix.stackexchange.com/questions/184266/bash-ping-script-file-for-checking-host-availability
[linux] script 測試 ping
分類:linux