grep -e "pattern1" -e "pattern2" file.txt
grep -E "pattern1|pattern2" file.txt
-E
option is used for extended regexThanks for clarifying my thoughtThis isn't just a Kali thing, but...
The -e only lets me use one pattern after it. I can use -e twice or more if I want more patterns.
Code:grep -e "pattern1" -e "pattern2" file.txt
If I use the -E option, I can use multiple patterns.
Code:grep -E "pattern1|pattern2" file.txt
So not really a lot of difference, just slightly less typing the second way.