bash script to edit xml file

前端 未结 4 1986
再見小時候
再見小時候 2021-02-06 00:53

I want to edit the config file of a program that is an XML:


   
       ...
       

        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 01:34

    Depending on what you want to do, you may want to use some XML-specific tooling (to handle character encodings, to maintain XML well-formedness etc.). You can use the normal line-oriented tools, but unless you're careful (or doing something trivial) you can easily create non-compliant XML.

    I use the XMLStarlet command line set. It's a set of command line utilities for specifically parsing/manipulating XML.

提交回复
热议问题