Skip to content

Instantly share code, notes, and snippets.

@jamesona
Created June 7, 2018 15:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#!/bin/bash
FILE=$1
if [ -f $FILE ]; then
curl $FILE > $FILE.new
cmp --silent $FILE $FILE.new || <do stuff here because the website changed>
else
curl $FILE > $file
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment