批量删除xml文件中的<?xml version="1.0" ?>
#!/bin/sh
cd 'home/usrname/'
ls
cd '/home/usrname/VOC2007/Annotations/'
for file in `ls /home/usrname/VOC2007/Annotations/`
do
echo $file
sed -i '/<?xml version="1.0" ?>/d' $file
done
echo 'all is ok.'
Sophie的世界,转载请注明出处,谢谢。