$ speakwhenup() { [ "$1" ] && PHOST="$1" || return 1; until ping -c1 -W2 $PHOST >/dev/null 2>&1; do sleep 5s; done; espeak "$PHOST is up" >/dev/null 2>&1 }espeak needs to be installed.
by David Winterbottom (codeinthehole.com)
from All commands http://ift.tt/1Fr53eE
No comments:
Post a Comment