I have an XML feed (this) in a single line so to extract the data I need I can do something like this:
sed -r 's:<([^>]+)>([^<]+)</\1>:&\n: g' feed | sed -nr '
/<item>/, $ s:.*<(title|link|description)>([^<]+)</\1>.*:\2: p'
since I can’t find a way to make first sed call to process result as different lines.
Any advice?
My goal is to get all data I need in a single sed call
New answer to new question. Now with branches and outputing all three chunks of information.