Last active
December 14, 2015 13:38
-
-
Save ShaneQful/5094636 to your computer and use it in GitHub Desktop.
To help someone on r/raspberry_pi
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 | |
BEFORE=0 | |
while true | |
do | |
wget https://news.ycombinator.com/rss -q -O test | |
NOW=$(wc -c test | grep -o -P "\d+") | |
if [ "$NOW" -ne "$BEFORE" ] ; then | |
mplayer Alert.ogg | |
fi | |
BEFORE=$NOW | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment