Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)

User Commands (d - f) ex(1)
[line] o[pen] /pattern/ [flags]
Enters open mode, which is equivalent to visual mode with a one-line window. All
visual mode subcommands are available. If a match is found for the optional regular
expression in line, the cursor is placed at the start of the matching pattern. The visual
mode subcommand Q (see vi) exits open mode.
pre[serve]
Saves the current buffer in a form that can later be recovered by using ex -r or by using
the recover subcommand. After the le has been preserved, a mail message is sent to
the user. This message can be read by invoking mailx. The message contains the name
of the le, the time of preservation, and an
ex subcommand for recovering the le.
Additional information can be included in the mail message.
[range] p[rint][count][flags]
Writes the addressed lines. Nonprintable characters, except for the Tab character, are
written as multicharacter sequences.
Long lines are folded. The only meaningful ags are # and l. The current line is the last
line written.
[line] pu[t][buffer]
Puts back deleted or yanked lines after the specied line. A buffer can be specied; oth-
erwise, the text in the unnamed buffer (where deleted or yanked text is placed by
default) is restored. The current line is the rst line put back.
q[uit][!] Terminates the editing session. If the current buffer has been modied since the last
write, the subcommand writes a warning and terminates. You can override this warning
and force an exit, discarding changes, by appending the character ! to the subcommand
name.
[line] r[ead][!][file]
Places a copy of the specied le in the current buffer after the target line (line 0 places
text at the beginning). If no le is named, the current le is the default. If there is no
current le, the specied le becomes the current le. If there is neither current le nor
le argument, the subcommand fails.
The current line is the last line read. In visual mode, the current line is the rst line read.
If le is preceded by !, le is taken to be an operating system command and passed to the
program named in the SHELL environment variable. The resulting output is read in to
the buffer. You can override the special meaning of ! by escaping it with a \ (backslash)
character.
rec[over] file
Attempts to recover le if it was saved as the result of a preserve subcommand, the
receipt of a signal, or a system or editor crash. The current line is reset as described for
the read subcommand.
rew[ind][!]
Rewinds the argument list; that is, sets the current le to the rst le in the argument list.
This is equivalent to a next subcommand with the current argument list as its argument.
If the current buffer has been modied since the last write, the subcommand writes a
warning and terminates. You can override the action by appending the ! (exclamation
point) character to the subcommand name (rew!). The current line is reset as described
for the read editor subcommand. This subcommand is affected by the autowrite and
writeany editor options.
527188-004 Hewlett-Packard Company 3111