Skip to content

Instantly share code, notes, and snippets.

@douglascodes
Created June 22, 2014 14:52
Show Gist options
  • Save douglascodes/1caaacd55a7edc66cd57 to your computer and use it in GitHub Desktop.
Save douglascodes/1caaacd55a7edc66cd57 to your computer and use it in GitHub Desktop.
Download, parse and strip tags from two XML attributes in single Linux command line. Great for testing RSS feeds.
wget -q -O- {http://www.example.com/foo.xml} | xpath -q -e '{path/to/xml_element/attr1} | {path/to/xml_element/attr2}' | sed -re 's/(<\w+?>|<\/\w+?>)//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment