Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    Accepting this answer because of the extra example/ proof Commented Dec 30, 2020 at 16:06
  • That is the equivalent of the pipeline the OP provided but if the OP actually wants to match 2 strings instead of 2 regexps then it'd be awk 'index($0,"string1") && index($0,"string2") Commented Jan 2, 2021 at 18:31