Watch Digg RSS Headlines From Terminal
Wouldn’t it be nice if you could just watch rss headline from digg (or any website) by just typing “digg” in your terminal?
Like this:
I used this shell script to achieve this:
#!/bin/sh
if [ $# -eq 1 ] ; then
headarg=$(( $1 * 2 )) # $(( )) specifies that you’re using an equation
else
headarg=”-20″ # default is four headlines
ficurl –silent “http://digg.com/rss/index.xml” | grep -E ‘(title>)’ | \
sed -n ‘4,$p’ | \
sed -e ’s/<title>//’ -e ’s/<\/title>//’|\
head $headarg
You can replace the digg rss feed url with any other website feed you want. Than just alias the word “digg” to the shell script to execute the script by typing “digg” alias digg=”sh rss.sh” or any words of your choice.
In case of digg you can even have customized rss feed with certain keyword from it’s search result: http://digg.com/search


