sed [选项] [脚本命令] 文件名 1、s/$// 在每一行后面追加空。2、s为搜索。如:s/a/b/ 搜索a将替换为b ,并只替换一次。3、s/ //g 将空格删除。4、g代表搜索到的全部替换 。5、“空格星”( “ “) 代理多个空格。6、/^$/d 删除空行。