Get lines between two patterns

You would use sed for a task like that. It supports a syntax like from lines matching AAA print everything up to and including a line matching XXX. Alas your input is a bit ill-formed because the starting pattern AAA occurs twice without a matching XXX for the second AAA. sed default behavior is to … Read more