How to remove XML tags from Unix command line?

后端 未结 5 1018
再見小時候
再見小時候 2021-01-31 18:43

I am grepping an XML File, which gives me output like this:

data
more data
...

Note, this is a fl

5条回答
  •  [愿得一人]
    2021-01-31 19:15

    I know this is not a "perlgolf contest", but I used to use this trick.

    Set Record Separator for < or >, then print only odd lines:

    awk -vRS='<|>' NR%2 file.xml
    

提交回复
热议问题