Skip to content

Instantly share code, notes, and snippets.

@ShaneQful
Last active December 14, 2015 13:38
Show Gist options
  • Save ShaneQful/5094636 to your computer and use it in GitHub Desktop.
Save ShaneQful/5094636 to your computer and use it in GitHub Desktop.
To help someone on r/raspberry_pi
#!/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