Hi,
I have a folder which contains multiple config.xml files and one input file, Please see the below format.
Config Files format looks like :-
Code:
<application name="SAMPLE-ARCHIVE">
<NVPairs name="Global Variables">
<NameValuePair>
<name>MIG_Host</name>
<value>217.171.101.225</value>
</NameValuePair>
<NameValuePairInteger>
<name>MIG_Port</name>
<value>8280</value>
</NameValuePairInteger>
<services>
<bw name="SAMPLE-ARCHIVE.par">
<enabled>true</enabled>
<bindings>
<binding name="">
<machine>HOSTNAME</machine>
<product>
<type>bwengine</type>
<version></version>
<location></location>
</product>
<description></description>
<contact></contact>
</binding>
</bindings>
</services>
</application>
INPUT FILE :-
Code:
MIG_Host,100.100.100.100
MIG_PORT,8080
Requirement :-
I need a shell script which should read the input file by each line and search for the first value in xml file and replace the value.
ex :-
search for "MIG_Host" in all xml files with in that folder and replace "217.171.101.225" value with "100.100.100.100"
In this way i need to apply each line to all xml files.
Thanks,
Suresh
Double post. Continued: http://www.unix.com/shell-programming-scripting/138394-need-help.html