Skip to content

Instantly share code, notes, and snippets.

@sankalp-khare
Created February 28, 2014 16:19
Show Gist options
  • Save sankalp-khare/9273937 to your computer and use it in GitHub Desktop.
Save sankalp-khare/9273937 to your computer and use it in GitHub Desktop.
#!/bin/bash
# checks if there are any changes...
NUMVIDZ=$(curl -s http://www.youtube.com/channel/UC_1vMv4Al_96QgYzkFjh99w/videos | grep "href=\"/watch?[^ ]*$")
while [[ 1 ]]
do
sleep 5m
NEWNUMVIDZ=$(curl -s http://www.youtube.com/channel/UC_1vMv4Al_96QgYzkFjh99w/videos | grep "href=\"/watch?[^ ]*$")
if [[ "$NEWNUMVIDZ" != "$NUMVIDZ" ]]
then
notify-send -t 21600000 "NEW FELICITY VIDEO(S) RELEASED! CHECK ASAP!!"
else
notify-send "Nothing new on the Felicity Channel :("
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment