I’m using grep to search for text within a specific directory. I would like to return rows of text that contain stringA AND stringB.
I know that doing grep “stringA|stringB” is effectively an OR statement, is there something I can do, maybe using regex, that would allow me to run an AND statement ?
Many Thanks
If you don’t know the order of the items, you could always reverse a pattern using |
This works geat with two items, three or more would start slowing things down for sure…