|
Search a string and append text after the string
Hi,
I have a file like this...
<o t="Batch" id="8410" p="/" g="32">
<a n="name">
<v s="DBBA1MM"/>
</a>
<a n="owner">
<v r="/[AdminUser]Administrator"/>
</a>
<a n="rights">
<v s="95"/>
</a>
<a n="debugLevel">
<v s="3"/>
</a>
<a n="avsStoreLoc">
<v s="/home/kp1771/fw_base_path/collectors/DBBA1MM/avs"/>
</a>
</o>
<o t="Batch" id="8410" p="/" g="27">
<a n="name">
<v s="DBBA1MM"/>
</a>
<a n="owner">
<v r="/[AdminUser]Administrator"/>
</a>
<a n="rights">
<v s="95"/>
</a>
<a n="avsStoreLoc">
<v s="/home/kp1771/fw_base_path/collectors/DBBA1MM/avs"/>
</a>
</o>
I have to add
<a n="debugLevel">
<v s="3"/>
</a>
after
<a n="rights">
<v s="95"/>
</a>
if <a n="debugLevel">
<v s="3"/>
</a> does not exits. I have to add the tag in red
If exists has to modify
<a n="debugLevel">
<v s="4"/>
</a>
can you help me on this..any type of help is appriciated thanks
|