Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (d - f) ed(1)
subshell), the ed command replaces the ! character with the previous system command;
for example, the command !! repeats the previous system command. If the command
interpreter (the sh command) expands the command string, ed echoes the expanded line.
The ! subcommand does not change the current line. If any replacements of % or ! are
performed, the modied line is written to the standard output le before the command is
executed.
number
+number
-number The ed command interprets a number alone on a line as an address and displays the
addressed line. Addresses can be absolute (line numbers or $) or relative to the current
line (+number or -number). Entering a newline character (a blank line) is equivalent to
+1p and is useful for stepping forward through the buffer one line at a time.
EXIT VALUES
The ed editor returns a value of 0 (zero) if execution is successfully completed; if an error occurs,
a value greater than 0 (zero) is returned.
RELATED INFORMATION
Commands: chmod(1), edit(1), grep(1), sed(1), sh(1), stty(1), vi(1).
Functions: regexp(3).
527188-007 Hewlett-Packard Company 349