显示包含模式 'Pap' 但不包含模式 'Aig' 的文件行

Display the lines of file that contain the pattern 'Pap' but they don't contain the pattern 'Aig'

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

在过滤器之间使用管道

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