Linux grep 过滤注释行

Linux grep About 128 words

命令

以下三个命令均可以。都是匹配以#$开头的关键字,使用-v参数进行反选。

命令一

grep -v ^#|^$ test.txt

命令二

grep -Ev "^#|^$" test.txt

命令三

grep -Ev "^(#|$)" test.txt
Views: 1,275 · Posted: 2022-06-15

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh