All ed commands are single characters, though some require additonal parameters. In general, at most one command is allowed per line. Text is entered in input mode. The current address is set to last line entered. The addressed lines are deleted from the buffer, and text is appended in their place.
Text is entered in input mode.
The current address is set to last line entered. If there is a line after the deleted range, then the current address is set to this line. Otherwise the current address is set to the line before the deleted range. If file is not specified, then the default filename is used. Any lines in the buffer are deleted before the new file is read.