#!/bin/sh
URL="http://feeds.bbci.co.uk/news/world/rss.xml"
#URL="http://feeds.bbci.co.uk/news/technology/rss.xml"
#URL="http://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml"
if [ $# -eq 1 ] ; then
headarg=$(( $1 *
2 ))
else
headarg="-8"
fi
/bin/date
echo ""
echo "
BBC World News"
echo "
**************"
curl --silent "$URL" | grep -E
'(title>|description>)' | \
sed -n '4,$p' | \
sed -e
's/<title>//' -e 's/<\/title>//' -e 's/<description>/ /' \
-e
's/<\/description>//' | \
sed -e
's/<!\[CDATA\[//g' |
sed -e
's/\]\]>//g' |
sed -e
's/<[^>]*>//g' |
head $headarg |
sed G | fmt
No comments:
Post a Comment