ex(1)

ex(1)

NAME

ex, edit - extended line-oriented text editor

SYNOPSIS

ex [-] [-l] [-r] [-R] [-ttag] [-v] [-wsize] [-x] [-C] [+command] [®le ...]

XPG4 Synopsis

ex [-rR] [-s-v] [-ccommand] [-ttag] [-wsize] [®le ...]

Obsolescent Options

ex [-rR] [- -v] [+command] [-ttag] [-wsize] [®le ...]

edit [-] [-l] [-r] [-R] [-ttag] [-v] [-wsize] [-x] [-C] [+command] [®le ...]

Remarks

The program names ex, edit, vi, view, and vedit are separate personalities of the same program. This manual entry describes the behavior of the ex/edit personality. On many HP-UX and other similar systems, e is a synonym for ex.

DESCRIPTION

The ex program is the line-oriented personality of a text editor that also supports screen-oriented editing (see vi(1)).

(XPG4 only.) Certain block-mode terminals do not have all the capabilities necessary to support the complete ex de®nition, such as the full-screen editing commands (visual mode or openmode). When these commands cannot be supported on such terminals, this condition shall neither produce an error message such as "not an editor command" nor report a syntax error.

The edit program is identical to ex, except that some editor option defaults are altered to make the editor somewhat friendlier for beginning and casual users (see Editor Options below).

Options and Arguments

ex recognizes the following command-line options and arguments:

-(Obsolescent) Suppress all interactive-user feedback. This is useful when editor commands are taken from scripts.

-s

(XPG4 only.)

 

Suppress all interactive-user feedback. This is useful when editor commands are taken

 

from scripts.

 

Ignore the value of the TERM and any implementation terminal type and assume the ter-

 

minal is a type incapable of supporting visual mode.

 

Suppress the use of the EXINIT environment variable and the reading of the .exrc ®le.

-l

Set the lisp editor option (see Editor Options below).

-r

Recover the speci®ed ®les after an editor or system crash. If no ®le is speci®ed, a list of all

 

saved ®les is printed. You must be the owner of the saved ®le in order to recover it

 

(superuser cannot recover ®les owned by other users).

-R

Set the readonly editor option to prevent overwriting a ®le inadvertently (see Editor

 

Options below).

-t tag

(XPG4 only.) Edit the ®le containing the speci®ed tag and proceed as if the ®rst command

 

were :tag tag. The tags represented by the -ttag and the ta command is optional. It

 

shall be provided on any system that also provides a con®rming implementation of ctags,

 

Otherwise, the use of the -tproduces unde®ned results.

 

Execute the tag tag command to load and position a prede®ned ®le. See the tag com-

 

mand in Command Descriptions and the tags editor option in Editor Options below.

-v

Invoke visual mode (vi).

-wsize

Set the value of the window editor option to size (see Editor Options below). If size is

 

omitted, it defaults to 3.

e

HP-UX Release 11i: December 2000

− 1 −

Section 1241