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

ex(1) OSS Shell and Utilities Reference Manual
NAME
ex - Edits lines in a le interactively
SYNOPSIS
ex [-c subcommand][-Rsv][-wnumber][+subcommand][-][le ...]
ex [-c subcommand][-Rsv][-t tag][le ...]
ex [-c subcommand] -r[le][-Rsv][le]
The ex command is a line-oriented text editor that is a subset of the
vi screen editor.
FLAGS
-c subcommand
Executes the specied ex subcommand (command) before displaying the le for which
the editor was invoked.
-r[file] Recovers le after an editor or system crash. If you do not specify le, a list of all saved
les is displayed.
-R Sets the readonly option, preventing you from altering the le.
-s Does not display the lename or the : prompt upon entering ex. (Silent mode.)
-ttag Loads the le that contains tag and positions the editor at tag. To use this ag, you must
rst create a database of function names and locations using the ctags command. (OSS
does not support the ctags command. However, it does support ctags les.)
-v Invokes the visual editor. When the -v ag is specied, an enlarged set of subcommands
are available, including screen editing and cursor movement features. See vi.
-wnumber
Sets the default window size to number lines. This ag is useful only if used with the -v
ag.
- Suppresses all interactive user feedback. If you use this ag, le input/output errors do
not generate an error message.
+subcommand
Begins the edit with the specied editor subcommand. When subcommand is not
entered, a + (plus sign) sets the current line to the bottom of the le. Normally ex sets
the current line to the last line of the le, or to some specied tag or pattern. (Obsoles-
cent)
DESCRIPTION
The ex editor is similar to ed, but is more powerful, providing multiline displays and access to a
screen editing mode. You may prefer to call vi directly to have environment variables set for
screen editing. Also edit, a limited subset of ex, is available for novices or casual use.
The le argument species the le or les to be edited. If you supply more than one le, the ex
editor edits each le in the specied order.
To determine how your tty can perform more efciently, ex uses the tty capability database ter-
minfo and the type of tty you are using from the TERM environment variable.
The ex editor has the following features:
You can view text in les. The z subcommand lets you access windows of text, and you
can scroll through text by pressing <Ctrl-d> and <Ctrl-u> (visual (-v) mode only).
3106 Hewlett-Packard Company 527188-004