ex(1)
Name
ex, edit − text editor
Syntax
ex [ − ] [ −v ] [ −x ] [ −t tag ] [ −r ] [ +command ] [ −l ] name...
edit [ ex options ]
Description
The ex editor is the root of a family of editors: edit, ex and vi. The ex editor is a superset of ed, with the most notable extension being a display-editing facility. Display-based editing is the focus of vi.
The name argument indicates the files to be edited.
Options
−Suppresses all interactive-user feedback. This option is useful in processing editor scripts in command files.
−vEquivalent to using vi rather than ex.
−tEquivalent to an initial tag command, that is, editing the file containing the tag and positioning the editor at its definition.
−rUsed to recover after an editor or system crash. It recovers by retrieving the last saved version of the named file. If no file is specified, it displays a list of saved files.
−RSets the read-only option at the start.
+command
Indicates that the editor should begin by executing the specified command. If the command is omitted, it defaults to $, positioning the editor at the last line of the first file, initially. Other useful commands here are scanning patterns of the form +/pattern or line numbers.
−lSets up for LISP. That is, it sets the showmatch and lisp options.
Note
The −x option is available only if the Encryption layered product is installed.
−xCauses ex to prompt for a key. The key is used to encrypt and decrypt the contents of the file. If the file contents have been encrypted with one key, you must use the same key to decrypt them.
Restrictions
The undo command causes all marks to be lost on lines changed and then restored if the marked lines were changed.
The undo command does not clear the buffer modified condition.
The z command prints a number of logical rather than physical lines. More than a screenful of output may result if long lines are present.
File input/output errors does not print a name if the command line minus sign (−) option is used.
There is no easy way to do a single scan ignoring case.
The editor does not warn you if you place text in named buffers and do not use it before exiting the editor.
Null characters are discarded from input files, and cannot appear in output files.
Files
/usr/lib/ex?.?recoverrecover command
/usr/lib/ex?.?preservepreserve command
/etc/termcapterminal capabilities
~/.exrceditor startup file
/tmp/Exnnnnneditor temporary
/tmp/Rxnnnnnnamed buffer temporary
/usr/preservepreservation directory
See Also
awk(1), ed(1), grep(1), sed(1), vi(1), termcap(5), environ(7)
Edit: A Tutorial and the Ex Reference Manual
ULTRIX Supplementary Documents Vol. I: General User