Tools: Grep

OR

$ grep "1\|2" 1.txt 1 2
$ grep -E "1|2" 1.txt 1 2
grep -E "^1$|2" 1.txt 1 2
grep -e 1 -e 2 1.txt 1 2
 egrep "1|2" 1.txt 1 2

AND

grep -E '1.*2' 2.txt 1 2
grep '1' 2.txt | grep '2' 2.txt 1 2 2

NOT

grep -v 1 2.txt

Leave a Reply

Your email address will not be published. Required fields are marked *