linux shell用法(6)-- sed - i 命令
来源:互联网 发布:樱井知香痉挛场景 编辑:程序博客网 时间:2024/06/10 06:34
sed -i 两种用法:
命令说明:
s 替换指定字符
常见使用:
1. 替换所有某些字符
sed -i "/s/需要替换的字符/新的字符/g" 需要替换字符的路径(file) eg: sed -i "s/Sent via Micromax//g" packages/apps/UnifiedEmail/res/values/strings.xml
替换以某些字符开头的一行中某些字符
sed -i "/某行开头字符/s/需要替换的字符/新的字符/" 需要替换字符的路径 eg:
替换以某些字符开头的一行中某个符后面所有
sed -i "/某行开头字符/s/某个符.*/某个符加上替换后字符/" 需要替换字符的路径 eg:
替换以某些字符开头的一行中某两个符后面中间部分
sed -i "/某行开头字符/s/字符a.*字符b/字符a+替换后的字符+字符b/" 需要替换字符的路径 eg:
0 0
- linux shell用法(6)-- sed - i 命令
- linux shell中sed命令用法
- Linux-shell-Sed命令的用法
- linux sed命令用法
- Linux sed命令用法
- linux sed 命令用法
- linux sed命令用法
- Linux-Sed命令用法
- linux sed 命令用法
- linux sed 命令用法
- linux sed命令用法
- Linux下Shell编程——sed命令基本用法
- Linux下Shell编程——sed命令基本用法
- Linux下Shell编程——sed命令基本用法
- linux shell之sed命令
- Linux Shell之sed命令
- Linux Shell之sed命令
- Linux Shell之sed命令
- iOS上传图片的方法
- 18周,计算机课
- [笔记]Python class中的__call__()方法
- [Docker] Error when starting docker in CentOS 7
- IOS LocationManager定位国内偏移,火星坐标(GCJ-02)解决方法
- linux shell用法(6)-- sed - i 命令
- doorbell反馈插件使用教程
- oracel ORA-01789异常
- 约瑟夫问题
- multimap 多重映照容器
- “DevTools” iOS version of the privacy policy
- Android Touch事件分发与消费机制
- RESTful architecture style.
- java学习笔记参考