Created
January 30, 2012 23:30
-
-
Save hjr3/1707498 to your computer and use it in GitHub Desktop.
Because cleansnipe.com has nothing on me...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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