Matching across lines

This section describes the matching across lines.

Function Syntax/Description
join next line [Line1 [,Line2] ]N

Joins the indicated input lines together, separating them by an embedded new-line character. Pattern matches can extend across the embedded new-lines(s).

delete first line of pattern space [Line1 [,Line2] ]D

Deletes all text in the pattern space up to and including the first new-line character. If only one line is in the pattern space, it reads another line. Starts the list of editing commands again from the beginning.

print first line of pattern space [Line1 [,Line2] ]P

Prints all text in the pattern space up to and including the first new-line character to STDOUT.