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.

3
  • 1
    Related: How to run grep with multiple AND patterns? Commented Apr 30, 2024 at 0:46
  • @steeldriver:  I’m considering VTCing that question for ambiguity — but, based on reading it a couple of times, I believe that it is looking for lines that contain all the words/patterns.  And I’m fairly sure that this question is asking for files that contain all the words, not necessarily on the same line  (e.g., find a file that contains “brillig”, “mimsy” and “vorpal”, rather than a line that contains “curious”, “forgotten” and “quaint”). Commented Apr 30, 2024 at 1:10
  • @G-ManSays'ReinstateMonica' I don't disagree with your analysis - I linked it because IMHO some of the methods are still relevant (for example, awk or perl solutions that could be applied with a suitable change to the record separator) Commented Apr 30, 2024 at 1:57