mercredi 4 mars 2015

Adding new attribute to existing xml file using sed or awk


I have a xml file which contains below details:


WSMQQueueConnectionFactory QMPMP 10.10.20.21

CHANNEL01 MQJMS_TP_CLIENT_MQ_TCPIP jboss:service=Naming


I want to search for a "HostName" attribute and add new attribute(port) after it. It should look like this :


WSMQQueueConnectionFactory QMPMP 10.10.20.21 1414 CHANNEL01 MQJMS_TP_CLIENT_MQ_TCPIP jboss:service=Naming Please suggest



Aucun commentaire:

Enregistrer un commentaire