1

Small tip | Search for multiple patterns / expressions using grep

view story
linux-howto

http://www.go2linux.org – Introduction If you want to search for multiple expressions while using grep you can do it, grep will use all expressions you pass to it, and will apply a logic or to them. So, if any of them is present the line with that occurrence will be printed. Specify multiple expressions / patterns to search for to grep The option that will help use doing this is -e. grep -e pattern1 -e pattern2 -e pattern3 /folder/file Easy as you can see. (HowTos)