Home > Software engineering >  Display the lines of file that contain the pattern 'Pap' but they don't contain the p
Display the lines of file that contain the pattern 'Pap' but they don't contain the p

Time:01-20

How to make such a double query ? I try grep -e Pap -e -v Aig filename.txt and grep 'Pap' && -v 'Aig' filename.txt but both don't work

CodePudding user response:

Use a pipe between your filters

grep -e Pap filename.txt | grep -v Aig
  •  Tags:  
  • Related