Skip to content

Instantly share code, notes, and snippets.

@robmiller
Last active December 15, 2015 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robmiller/5216042 to your computer and use it in GitHub Desktop.
Save robmiller/5216042 to your computer and use it in GitHub Desktop.
ZSH one-liner to poll every five seconds to see whether a site is updated. Replace "example.com" with your domain, obviously. Relies on your site sending sensible "Age" headers.
while true; do [[ `curl -ILs http://example.com/ | grep 'Age:' | sed 's/Age: //'` < 10 ]] && say "It updated"; sleep 5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment