KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am grepping an XML File, which gives me output like this: <tag>data</tag> <tag>more data</tag> ... Note, this is a flat file, not an XML tree. I want to remove the XML tags and just display the data in between. I'm doing all this from the command line and was wondering if there is a better way than piping it into awk twice... cat file.xml | awk -F'>' '{print $2}' | awk -F'<' '{print $1}' Ideally, I would like to do this in one command
Tags (comma-separated)
Save Edits
Cancel