Juicy lil' bytes

Read RSS Feeds in Your Terminal on Linux and Mac OSX

Here’s a one liner that allows you to read RSS feed titles in your terminal window.

cURL + grep + sed = Terminal RSS Feeds

Here is the the generic command:

curl "THE_RSS_FEED"  2>/dev/null | grep "<title>" | sed -e "s/.*\<title\>\(.*\)\<\/title\>.*/»\ \1/g" | less

Replace THE_RSS_FEED with the URL of the syndicated site feed (surrounded by the double quotes) and confirm that the raw feed XML displays item titles with a plain <title> tag (i.e. without CDATA tags or other XML detritus).

If you’d like to prepend a different list symbol for the titles, replace the » character with another ascii symbol or symbols.

I have been playing around with this using the Tweetledee files to view Twitter search, favorites, list, and user timeline feeds. The formatting for up to 140 chars could use a bit of work but it is functional.

Do it Without less

The command uses the less shell command to create paginated formatting. If you prefer not to use this, just remove the last pipe (|) and the less command at the end of the command string.

Source: I made slight modifications to the shell command posted by c3w on commandlinefu.com