↧
Answer by cas for Inserting a text between 2 patterns
As chaos said, making the file a valid XML file and using xmlstarlet or similar xml processing tool (e.g. xsh) is the "right" answer...but if you just want to do simple templating then you would modify...
View ArticleAnswer by chaos for Inserting a text between 2 patterns
The file that is given is not valid xml. You have to add opening and closing root tags. Like this: <xml> <controller-host></controller-host>...
View ArticleAnswer by Kira for Inserting a text between 2 patterns
You can try something like this: $host='hostname' sed -i 's/<controller-host><\/controller-host>/<controller-host>AppDynamicsHost<\/controller-host>/' yourfile.xml sed -i...
View ArticleInserting a text between 2 patterns
I have a .xml file which contains the below <controller-host></controller-host> <controller-port></controller-port> <tier-name></tier-name>...
View Article