Replace the pattern space with the next line of input. N Append the next line of input to the pattern space with an embedded new-line. If the end of input is reached, the N command verb shall branch to the end of the script and quit without starting a new cycle. 2 p Print. Copy the pattern space to the standard output.
P Copy the initial segment of the pattern space through the first new-line to the standard output.
1 q Quit. Branch to the end of the script. Do not start a new cycle. Read the contents of rfile . Place them on the output before reading the next input line.