For each matching line, the line is printed, the current address is set, and the user is prompted to enter a command-list . A newline alone acts as a null command list. H Toggles the printing of error explanations. By default, explanations are not printed. It is recommended that ed scripts begin with this command to aid in debugging.
Text is entered in input mode.
The current address is set to the last line entered. The addressed lines are deleted from the buffer and replaced by a single line containing their joined text. The current address is set to the resultant line. The mark is not cleared until the line is deleted or otherwise modified. If invoked from a terminal, ed pauses at the end of each page until a newline is entered.