Skip to content

Instantly share code, notes, and snippets.

@ShaneQful
Created February 24, 2014 21:08
Show Gist options
  • Save ShaneQful/9197131 to your computer and use it in GitHub Desktop.
Save ShaneQful/9197131 to your computer and use it in GitHub Desktop.
Checks for lastest episode of LAS and dowloads it if there's a new episode
#!/bin/bash
BEFORE=0
while true
do
wget http://feeds.feedburner.com/linuxashd -q -O las.feed
NOW=$(wc -c las.feed | grep -o -P "\d+")
if [ "$NOW" -ne "$BEFORE" ] ; then
wget $(grep -o -P "url(\s|\S)+\.mp4" las.feed | head -1 | cut -c 6-)
fi
BEFORE=$NOW
sleep 86400 # Every day
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment