10 Diagnostics

ed prints two kinds of messages: diagnostic messages (errors and warnings) written to standard error and help messages written to standard output. Diagnostic messages may be suppresed with option -q. Help messages may be enabled with option -v and may be toggled with command ‘H’.

ed warns the first time that a command modifies a buffer loaded from a read-only file.

When an error occurs, if ed’s standard input is a regular file or here document, then it exits, otherwise it prints a ‘?’ and returns to command mode. An explanation of the last error can be printed with the ‘h’ (help) command.

If the ‘u’ (undo) command occurs in a global command list, then the command list is executed only once.