Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
ex(1) OSS Shell and Utilities Reference Manual
[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 file 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 file, the time of preservation, and an ex subcommand for recovering the file.
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 flags are # and l. The current line is the last
line written.
[line] pu[t][buffer]
Puts back deleted or yanked lines after the specified line. A buffer can be specified; oth-
erwise, the text in the unnamed buffer (where deleted or yanked text is placed by
default) is restored. The current line is the first line put back.
q[uit][!] Terminates the editing session. If the current buffer has been modified 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 specified file in the current buffer after the target line (line 0 places
text at the beginning). If no file is named, the current file is the default. If there is no
current file, the specified file becomes the current file. If there is neither current file nor
file argument, the subcommand fails.
The current line is the last line read. In visual mode, the current line is the first line read.
If file is preceded by !, file 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 file 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 file to the first file 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 modified 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.
3−114 Hewlett-Packard Company 527188-021