截取一段字符
来源:互联网 发布:农商银行柜员工资知乎 编辑:程序博客网 时间:2024/04/30 05:56
今天在处理mysqlbinlog的时候insert,和update 语句比较长换行比较多,有点类似于
要截取整段文字,如果截取
<phase a>
this is a test
hellow world
</phase>
用下面的shell就可以处理整段文字,获取<phase a> 开头,</phase>结尾的一段
[root@rac1 ~]# sed -ne '/\<phase a\>/,/^<\/phase>/p' 1.txt
<phase a>
this is a test
hellow world
</phase>
[root@rac1 ~]# sed -ne '/<phase a>/,/^<\/phase>/p' 1.txt
<phase a>
this is a test
hellow world
</phase>
0 0
- 截取一段字符
- 用 Substring 函数截取一段字符
- 截取字符串中任意一段字符的函数
- String截取一段
- 字符截取
- 截取字符
- 字符截取
- ffmpeg截取一段视频中一段视频
- ffmpeg 截取一段视频命令
- 鸟哥采访截取一段
- 字符截取;字符替换;
- 模版截取字符
- asp截取中英文字符
- c#截取中英文字符
- 截取字符函数
- PHP截取字符类
- PHP中截取字符
- 中英文混合字符截取
- POJ 3640 Conformity 可能会
- undefined和not defined
- session过期处理问题
- 使用 flow.ci 快速发布你的项目文档
- stat命令
- 截取一段字符
- 第六章 Transporter
- BigDecimal从单位元转换为分,并四舍五入取整
- Jdk 环境安装
- 七牛云存储____官方SDK集成开发
- 往内部存储写文件
- 监听UIAlertView
- 容器的概念
- adb shell top 命令中几个内存信息的解释 【RSS,PSS,USS,VSS】 native,dalvik内存