我使用下面的命令来过滤文件中的 # 和空行。但是,我们如何使用单个 grep 在 Linux 中 grep 未注释的行和空行。
[root@localhost ~]# cat test | grep -v ^# | grep -v ^$
linux grep
grep ×1
linux ×1