e

ex(1)

ex(1)

By default, ex shall start in the command mode, which shall be indicated by the ":" prompt. The input mode can be entered by append, insert, or change commands. There is one other mode, visual mode, in which full screen editing is available. This is described more fully under the visual command. The command line can consist of multiple ex commands separated by vertical-line characters(). The use of commands that enter input or visual modes in this manner, unless they are the ®nal command on the line, produces unde®ned results.

Command lines beginning with the double-quote character (") shall be ignored. This can be used for comments in an editor script.

WARNINGS

The undo command causes all marks to be lost on lines that are changed and then restored.

The z command prints a number of logical rather than physical lines. More than a screenful of output can result if long lines are present.

Null characters are discarded in input ®les and cannot appear in resultant ®les.

On some systems, the recovery of an edit ®le with the -roption is possible only if certain system- dependent actions are taken when the system is restarted.

Edit preserve ®les can only be recovered on systems running the same HP-UX release in which they were preserved. Preserve ®les are not recoverable across different releases.

On HP terminals, the attribute ®eld of any function key speci®ed by a map #n ... command should be set to normal rather than to the default of transmit.

Do not use the -Coption to edit unencrypted ®les. The -Coption is meant to be used only on ®les that are already encrypted. If the -Coption is used on ®les which are not yet encrypted, a write in the edit session is likely to corrupt the ®le.

For information about line length limits, ®le size limits, etc., see the WARNINGS section of vi(1).

EXIT STATUS (XPG4 Only)

The ex utility shall exit with one of the following values:

0Successful completion.

>0 An error occurred.

AUTHOR

ex was developed by the University of California, Berkeley. The 16-bit extensions to ex are based in part on software of the Toshiba Corporation.

FILES

Primary editor initialization ®le

$HOME/.exrc

./.exrc

Secondary editor initialization ®le

/usr/lbin/expreserve

Preserve command

/usr/lbin/exrecover

Recover command

/usr/share/lib/terminfo/*/*

Description of terminal capabilities

/var/preserve

Preservation directory

/var/tmp/Ex nnnnn

Editor temporary ®le

/var/tmp/Rx nnnnn

Named buffer temporary ®le

SEE ALSO

ctags(1), ed(1), stty(1), vi(1), write(1), terminfo(4), environ(5), lang(5), regexp(5).

The Ultimate Guide to the vi and ex Text Editors, Benjamin/Cummings Publishing Company, Inc., ISBN 0- 8053-4460-8, HP part number 97005-90015.

STANDARDS COMPLIANCE

ex: SVID2, SVID3, XPG2, XPG3, XPG4

Section 1258

− 18 −

HP-UX Release 11i: December 2000