【问题标题】:Display the lines of file that contain the pattern 'Pap' but they don't contain the pattern 'Aig'显示包含模式“Pap”但不包含模式“Aig”的文件行
【发布时间】:2022-01-18 19:18:41
【问题描述】:

如何进行这样的双重查询? 我试试grep -e Pap -e -v Aig filename.txtgrep 'Pap' && -v 'Aig' filename.txt 但两者都不起作用

【问题讨论】:

    标签: linux ubuntu


    【解决方案1】:

    在过滤器之间使用管道

    grep -e Pap filename.txt | grep -v Aig
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-25
      • 1970-01-01
      • 2015-08-15
      • 2013-08-22
      • 2011-12-21
      • 1970-01-01
      相关资源
      最近更新 更多