Skip to content

Instantly share code, notes, and snippets.

@b0o
Created July 11, 2018 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b0o/b543d3b1080e26e2ac873e07f212dad7 to your computer and use it in GitHub Desktop.
Save b0o/b543d3b1080e26e2ac873e07f212dad7 to your computer and use it in GitHub Desktop.
#!/bin/bash
n="${1:-1}"
output="$(curl -s "https://www.archlinux.org/feeds/news/" | xmlstarlet sel -T -t -m /rss/channel/item -v "concat(pubDate,': ',title)" -n | head -n $n)";
echo -e "\e[1;31mhttps://www.archlinux.org/";
echo "$output";
echo -en "\e[0m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment