sed命令命令功能命令功能a\在当前行之后追加文本i\在当前行之前插入文本rAppend text read from filename.(从文件中读入并追加文本)c\用新文本替换当前行中的文本d删除行h/H Copy/append pattern space to hold space.
将模式空间的内容复制/追加到暂存缓冲区。
g/GCopy/append hold space to pattern space.xExchange the contents of the hold and pattern spaces.l列出非打印字符n/NRead/append the next line of input into the pattern space.pPrint the current pattern space.s###g全局替换,#为间隔符wWrite the current pattern space to filename.yy/source/dest/ 将字符串转换为另一个字符sed选项选项功能-n取消默认输出-e允许多项编辑-f指定sed脚本文件-i修改原文件-ruse extended regular expressions in the script.