Adding xml tag after xyz if not present

Viewed 19

how we can add the following "<cluster-connection ...." entry using SED command after the "<jgroups-discovery-group..." if the entry "<cluster-connection ...." not present.

<jgroups-discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>

<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" discovery-group="dg-group1"/>

<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>

0 Answers
Related