#!/bin/sh while true; do for i in $(dig irc.supernets.org A irc.supernets.org AAAA +short); do ping -c 1 $i 2>&1 >/dev/null [ $? -ne 0 ] && echo "`date`: ping failed! ($i)" done sleep 300 done