Quantcast
Channel: Inserting a text between 2 patterns - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 4

Inserting a text between 2 patterns

$
0
0

I have a .xml file which contains the below

<controller-host></controller-host>
 <controller-port></controller-port>
<tier-name></tier-name>
<node-name></node-name>

I want the output like this

<controller-host>AppDynamicsHost</controller-host>
 <controller-port>80</controller-port>
<tier-name>**the host name**</tier-name>
<node-name>tomcat server</node-name>

I tried to use sed but not able to.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>