I have a very big text file
~ 105 G it's includes a lot of
<XXXX> (angle brackets including text in between).
I want to remove those brackets and text in between.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Given an XML file and availability of XMLStarlet:
$ cat file.xml <root> <tag attrib="hello">Hello world</tag> <tag attrib="nice">Nice to see you</tag> </root>
$ xmlstarlet sel -t -v / file.xml Hello world Nice to see you
This uses XMLStarlet to extract the values of the root node and all of its child nodes.