Created
October 27, 2014 14:50
-
-
Save cirrusUK/5fd7e15ce430144e2cbe to your computer and use it in GitHub Desktop.
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/sh | |
URL="http://feeds.bbci.co.uk/news/uk/rss.xml" | |
curl --silent "$URL" | grep -E '(title>|description>)' | \ | |
grep -E '(<title>|description)' | tail -n +4 | sed -e 's/<!\[CDATA\[//g' -e 's/\]\]>//g' | sed -e 's/<a.*a>/ /g' | sed -e 's/<*.title>//g' -e 's/<.*/\ | |
/' | sed -e 's/<*.title>//g' -e 's/<.*/\ | |
/' | sed -e '/<description>/d' | sed -e 's/<\/description>/\ | |
/g | |
' | fmt -w 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment