Skip to content

Instantly share code, notes, and snippets.

@atomicstack
Created October 24, 2014 14:07
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 atomicstack/f0149ee5a1d00383fa9d to your computer and use it in GitHub Desktop.
Save atomicstack/f0149ee5a1d00383fa9d to your computer and use it in GitHub Desktop.
export TEMPDEST=/tmp/trouw URL=https://www.ticketswap.nl/36538/trouw-op-zondag-ade-special-ade; while sleep 5; do curl --silent $URL | grep -w -A2 counter-available >! $TEMPDEST; new_sha=$(sha1sum $TEMPDEST | awk '{print $1}'); if [[ "$new_sha" != "$last_sha" ]]; then; rgrowl 'tickets changed' "$( grep counter-value $TEMPDEST )"; echo $new_sha; fi; last_sha=$new_sha; echo -n . ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment