【发布时间】:2017-06-08 10:37:11
【问题描述】:
我有一个文本文件text0.txt 喜欢
# text0.txt
# This is comment
Hello, I like banana. # more comments
bra bra bra...
问题是命令是什么
$ some_command text0.txt
哪个输出
Hello, I like banana.
bra bra bra...
到标准输出。
我正在使用 bash。 谢谢。
【问题讨论】:
-
你有没有尝试过自己研究这个?
-
感谢您的指点。实际上,它解决了问题。我没有使用 sed 的想法,也无法搜索“#”作为关键字。
-
我刚刚在谷歌上搜索了
remove comments bash。
标签: bash