Skip to content

Instantly share code, notes, and snippets.

@hjr3
Created January 30, 2012 23:30
Show Gist options
  • Save hjr3/1707498 to your computer and use it in GitHub Desktop.
Save hjr3/1707498 to your computer and use it in GitHub Desktop.
Because cleansnipe.com has nothing on me...
#!/bin/bash
LOCK=/home/user/wm.lock
if [ -f $LOCK ]; then
exit 0
fi
PAGE=$(curl -s http://www.whiskeymilitia.com/)
FOUND=0
for item in eg1 eg2 denim "snowboard pant"; do
echo "$PAGE" | grep -i "$item"
if [ $? -eq 0 ]; then
echo "Found $item on WM" | mail [email protected]
FOUND=1
fi
done
if [ $FOUND -eq 1 ]; then
touch $LOCK
echo "rm -f $LOCK" | at now + 10 minute
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment