批量删除xml文件中的<?xml version="1.0" ?>
2015-07-31 15:32
477 查看
#!/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.'
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.'
相关文章推荐
- lucene入门
- 初识通用数据库操作类――前端easyui-datagrid,form(php)
- swt/jface tableViewer开发简化
- 思达BI软件StyleIntelligence实例教程—雷达图
- jQuery操作class
- iOS Crash文件中常见的Exception Type & Exception Code
- 三大线性排序之桶排序
- 持久化persistence.xml配置文件
- Angular 一些问题(跨域,后台接收不到参数)
- 神经网络实现步骤
- 域名查询
- 神经网络实现步骤
- oc中根类和私有方法
- JAVA 泛型BaseDao<T> BaseService <T>
- AnswerSheetDao
- Android 基础控件之CheckBox与RadioButton
- Pan
- C语言编程入门——循环(下)
- Android EditText setOnClickListener事件 只有获取焦点才能响应 采用setOnTouchListener解决
- Unity3D之在Unity编辑器中添加菜单