Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 7
    Do not ever use bash to parse structured trees of arbitrary data. Use a real XML parser. I recommend XMLStarlet. Commented Jul 17, 2013 at 15:16
  • stackoverflow.com/questions/893585/how-to-parse-xml-in-bash Commented Oct 7, 2015 at 10:57
  • Anyone with a Perl5 solution? I'd love to see how Perl5 and the Raku (a.k.a Perl6) solution below compare to each other. Commented Jul 15, 2021 at 16:50