Shellscript Read XML attribute value

后端 未结 3 1011
刺人心
刺人心 2021-01-05 23:08

We want to read XML attributes from an XML file. Example of file content is as below:


  
  <         


        
3条回答
  •  既然无缘
    2021-01-05 23:14

    sed -n '/

    Creates a hold pattern for the value then matches everything except for the newline to avoid printing the newline, it expects the value double quoted as per your example data.

    E.g. 
    
      
      
    
    
    Output:
    15
    

    (Prior to edit: sed '/)

提交回复
热议问题