Skip to content

Instantly share code, notes, and snippets.

@fijiwebdesign
Created September 12, 2017 07:38
Show Gist options
  • Save fijiwebdesign/5bd465182a1f16a8bbda2ba29fc31e67 to your computer and use it in GitHub Desktop.
Save fijiwebdesign/5bd465182a1f16a8bbda2ba29fc31e67 to your computer and use it in GitHub Desktop.
Watch and notify in terminal
# Make sure you have volume on your mac
# an ANSWER for DNS A record has resolved for example.com
watch 'dig A example.com | grep ANSWER | [[ ! -z $(cat /dev/stdin) ]] && say "DNS has resolved"'
# an ANSWER for DNS A record has resolved to IP 93.184.216.34
watch 'dig A example.com | grep 93.184.216.34 | [[ ! -z $(cat /dev/stdin) ]] && say "DNS has resolved"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment