May be this is a known issue. When I am using sed to change a string (globally) in multiple files, it is doing its job while truncating the file. So the xml files are losing some of the tags
Any work around? Appreciate your help guys......
Here is the code.....
#!/bin/sh
for files in *.xml; do
mv $files $files.old
sed 's/OLD_STRING/NEW_STRING/g' $files.old > $files
rm -f $files.old
done