I’m using the following command combination to print value from an XML file to another file:
grep -Po '<add key="WorkstationID" value="K[^"]+' web.config.txt | awk '{print "MapOPIWs = 4200000" $0}' >> fipayeps_def.cfg && echo '"' >> fipayeps_def.cfg
but I have have this newline issue:
cat fipayeps_def.cfg
MapOPIWs = "000001769
"
when the desired result should be:
MapOPIWs = "000001769"
Any idea to fix it?