Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
ex(1) OSS Shell and Utilities Reference Manual
NAME
ex - Edits lines in a file interactively
SYNOPSIS
ex [-c subcommand][-Rsv][-wnumber][+subcommand][-][file ...]
ex [-c subcommand][-Rsv][-t tag][file ...]
ex [-c subcommand] -r[file][-Rsv][file]
The ex command is a line-oriented text editor that is a subset of the
vi screen editor.
FLAGS
-c subcommand
Executes the specified ex subcommand (command) before displaying the file for which
the editor was invoked.
-r[file] Recovers file after an editor or system crash. If you do not specify file, a list of all saved
files is displayed.
-R Sets the readonly option, preventing you from altering the file.
-s Does not display the filename or the : prompt upon entering ex. (Silent mode.)
-ttag Loads the file that contains tag and positions the editor at tag. To use this flag, you must
first create a database of function names and locations using the ctags command. (OSS
does not support the ctags command. However, it does support ctags files.)
-v Invokes the visual editor. When the -v flag is specified, 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 flag is useful only if used with the -v
flag.
- Suppresses all interactive user feedback. If you use this flag, file input/output errors do
not generate an error message.
+subcommand
Begins the edit with the specified editor subcommand. When subcommand is not
entered, a + (plus sign) sets the current line to the bottom of the file. Normally ex sets
the current line to the last line of the file, or to some specified 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 file argument specifies the file or files to be edited. If you supply more than one file, the ex
editor edits each file in the specified order.
To determine how your tty can perform more efficiently, 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 files. 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).
3−106 Hewlett-Packard Company 527188-003