![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-25-1024x428.png)
The last article 《grep or condition, grep and condition》 introduced grep and, or use, including the use of the -e parameter.
Here is a detailed description of the use of the -e parameter.
grep one pattern
➜ grep -e "12" test1.txt
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-21-1024x314.png)
➜ grep "12" test1.txt The results are consistent.
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-22-1024x299.png)
grep two patterns
➜ grep -e "12" -e "linux" test1.txt
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-23-1024x317.png)
grep three patterns
➜ grep -e "12" -e "linux" -e "apple" test1.txt
![](https://www.linuxcommands.site/wp-content/uploads/2019/10/image-24-1024x338.png)
Multiple patterns and so on.
Grep and condition can also use grep -e parameter.