Skip to content

Instantly share code, notes, and snippets.

@wandernauta
Created December 22, 2011 13:47
Show Gist options
  • Save wandernauta/1510352 to your computer and use it in GitHub Desktop.
Save wandernauta/1510352 to your computer and use it in GitHub Desktop.
Read the Arch Linux news feed on the console.
#
# anews.sh
# Read the Arch Linux news feed on the console
#
# Put (or source) this in your .zsh_profile or whatever.
#
# Usage:
# $ anews
#
# Bugs:
# - Doesn't cache. At all.
#
anews () {
URL="http://www.archlinux.org/feeds/news/"
curl -s $URL | xmllint --format - | grep -oE "<title>(.*)<\/title>" | tail -n+2 | sed -r 's/<\/?title>//g' | sed -r 's/^/- /g'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment