1
I have a xml file
in which the line that needs to be searched is:
SEARCH='<?xml version="1.0" encoding="UTF-8" standalone="no"?><SSC>'
This searched value needs to be replaced with the value in the following variable or can also be stored in another file:
REPLACE='<?xml version="1.0" encoding="UTF-8" standalone="no"?><SSC><ErrorContext><CompatibilityMode>0</CompatibilityMode><ErrorOutput>1</ErrorOutput>.......some more tags.....</MethodContext>
'
How can this be done using unix commands like SED or AWK? (Here SEARCH needs to be replaced with REPLACE.
The question is not proper.Apologies. – tejasw – 2014-07-07T09:42:31.320
1Your input is no well-formed XML. Anyway: Never try to change XML with regular expressions, XML is no regular language and cannot be parsed with regular expressions. – Jens Erat – 2014-07-07T09:59:52.333