while ! ping -c1 the_host_down; do sleep 1; done && date | mail -s 'the host is back!' me@example.com
October 10, 2011 — janos
ping -c1 host
while
-c1