#删除注释行
$ sed '/^#/d' <file>
$ sed '/#/d' <file>
# 删除空行
$ sed '/^$/d' <file>
# 删除空行并写入到文件
$ sed -i '/^$/d' <file>
Linux sed删除文件注释行并删除空行
原创a772304419 ©著作权
©著作权归作者所有:来自51CTO博客作者a772304419的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
python删除文本前10行 python删除文本最后一行
python去掉txt文件行尾换行
python删除文本前10行 python txt文件 字符串