Have you tried anything so far? I would use awk to do this. When it finds <a n="rights"> you could read ahead a few lines using getline. If it contains "debugLevel" you could print out the new debug level, if not, just add debug level 3. For every other line, just print it.
Hi Annihilannic,
I used awk '/rights/,/avsStoreLoc/ { print }' a.xml
to extract the text between "rights" and "avsStoreLoc" ..but it didnt help me much
Hi Annihilannic,
The script works good..I have one more concern i should be able to print the changes in the same file where we are searching..how can I do.
Hi Annihilannic,
I am very sorry,I tried your script
cp -p originalfile originalfile.bak && awk '<your script here>' originalfile.bak > originalfile
It didnt put back the changes to original file.I tried different ways but could not.
Should I use any merge or join to put back the changes to original file.
Let me know if any thing needs to be done
Thanks for your valuable answers to my query.