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.

Required fields*

2
  • I've never heard of -00. Is it using an empty line as input record separator? In that case it will work with my specific input, but not according to my problem description. It cuts the records apart when empty lines occur between Compiling and error:. But it would be an interesting solution if -00 can be instrumented to use "empty line before Compiling" as record separator. Commented Sep 30, 2021 at 19:17
  • @AlanTam awk has paragraph mode too (RS="") if you can't have empty lines within Compiling sections. It won't use any less memory than the buffering after Compiling solutions though. You can also set GNU awk (and I assume perl or whatever else) to use \n\nCompiling as the record separator if that was useful but again, it won't help with memory. Commented Sep 30, 2021 at 19:40