EX(1) EX(1) NAME ex, edit - text editor SYNOPSIS ex [ - ] [ -v ] [ -t tag ] [ -r ] [ +_c_o_m_m_a_n_d ] [ -l ] name ... edit [ ex options ] DESCRIPTION _E_x is the root of a family of editors: _e_d_i_t_, _e_x and _v_i_. _E_x is a super‐ set of _e_d_, with the most notable extension being a display editing facility. Display based editing is the focus of _v_i_. If you have not used _e_d_, or are a casual user, you will find that the editor _e_d_i_t is convenient for you. It avoids some of the complexities of _e_x used mostly by systems programmers and persons very familiar with _e_d_. If you have a CRT terminal, you may wish to use a display based editor; in this case see _v_i(1), which is a command which focuses on the display editing portion of _e_x_. DOCUMENTATION The document _E_d_i_t_: _A _t_u_t_o_r_i_a_l (USD:14) provides a comprehensive intro‐ duction to _e_d_i_t assuming no previous knowledge of computers or the UNIX system. The _E_x _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l _- _V_e_r_s_i_o_n _3_._7 (USD:16) is a comprehensive and complete manual for the command mode features of _e_x_, but you cannot learn to use the editor by reading it. For an introduction to more advanced forms of editing using the command mode of _e_x see the editing documents written by Brian Kernighan for the editor _e_d_; the material in the introductory and advanced documents works also with _e_x_. _A_n _I_n_t_r_o_d_u_c_t_i_o_n _t_o _D_i_s_p_l_a_y _E_d_i_t_i_n_g _w_i_t_h _V_i (USD:15) introduces the dis‐ play editor _v_i and provides reference material on _v_i_. In addition, the _V_i _Q_u_i_c_k _R_e_f_e_r_e_n_c_e card summarizes the commands of _v_i in a useful, functional way, and is useful with the _I_n_t_r_o_d_u_c_t_i_o_n_. FILES /usr/lib/ex?.?strings error messages /usr/lib/ex?.?recover recover command /usr/lib/ex?.?preserve preserve command /etc/termcap describes capabilities of terminals ~/.exrc editor startup file /tmp/Ex_n_n_n_n_n editor temporary /tmp/Rx_n_n_n_n_n named buffer temporary /usr/preserve preservation directory SEE ALSO awk(1), ed(1), grep(1), sed(1), grep(1), vi(1), termcap(5), environ(7) AUTHOR Originally written by William Joy Mark Horton has maintained the editor since version 2.7, adding macros, support for many unusual terminals, and other features such as word abbreviation mode. BUGS The _u_n_d_o command causes all marks to be lost on lines changed and then restored if the marked lines were changed. _U_n_d_o never clears the buffer modified condition. The _z command prints a number of logical rather than physical lines. More than a screen full of output may result if long lines are present. File input/output errors don’t print a name if the command line ‘‘-’’ option is used. There is no easy way to do a single scan ignoring case. The editor does not warn if text is placed in named buffers and not used before exiting the editor. Null characters are discarded in input files, and cannot appear in resultant files. 4th Berkeley Distribution June 5, 1986 EX(1)