sed: stream editor
sed [options] [sed-commands] [input-files]
1.追加
a:追加到指定行后

i:插入到指定行,原来行内容下移

多行添加


2.删除




等差数列删除

正则删除:

3.改
c 用新行取代旧行

变量在sed中的使用

4,特殊符号:
& 符号代表前面的内容

批量修改文件名称

5,混合查询

原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/1995.html