【发布时间】:2022-02-16 00:39:29
【问题描述】:
如何使用 sed 将只有 # 的行替换为空行?
我试图在谷歌上找到,但我没有得到任何东西。
文件内容:
#test
another test
#
another test2
预期结果:
#test
another test
another test2
因此,在预期的结果下,经过另一次测试,该行应该是空白的,没有#。
非常感谢任何帮助。
【问题讨论】:
-
我们鼓励提问者展示他们迄今为止为自己解决问题所做的尝试。
标签: sed