редактировать текст (edit text)
Последствия ошибок (Consequences of errors)
When an error in the input script is encountered, or when an
error is detected that is a consequence of the data (not) present
in the file or due to an external condition such as a read or
write error:
* If the standard input is a terminal device file, all input
shall be flushed, and a new command read.
* If the standard input is a regular file, ed shall terminate
with a non-zero exit status.
The following sections are informative.