Line manipulation

This section describes the line manipulation.

Function Syntax/Description
append lines [Line1]a\\nText

Writes the lines contained in Text to the output stream after Line1. The a command must appear at the end of a line.

change lines [Line1 [,Line2] ]c\\nText

Deletes the lines specified by Line1 and Line2 as the delete lines command does. Then it writes Text to the output stream in place of the deleted lines.

delete lines [Line1 [,Line2] ]d

Removes lines from the input stream and does not copy them to the output stream. The lines not copied begin at line number Line1. The next line copied to the output stream is line number Line2 + 1. If you specify only one line number, then only that line is not copied. If you do not specify a line number, the next line is not copied. You cannot perform any other functions on lines that are not copied to the output.

insert lines [Line1] i \\nText

Writes the lines contained in Text to the output stream before Line1. The i command must appear at the end of a line.

next line [Line1 [,Line2] ]n

Reads the next line, or group of lines from Line1 to Line2 into the pattern space. The current contents of the pattern space are written to the output if it has not been deleted.