>_ IzzyLab

Topic breakdown

In sed a command's address can be not a single line but a range of two patterns written with a comma: from the first line matching the start pattern to the first matching the stop pattern — inclusive. By default sed prints every input line, so to "cut out only the range" you suppress auto-output with the -n flag and specify printing of the desired section with an explicit print command. This is the basic technique for extracting blocks between markers.

What's checked

  1. block extracted correctly

What it looks like