don't let users create their own symbol table for the running kernel
[unix-history] / usr / src / usr.bin / ex / ex.1
CommitLineData
f35cac8e
CL
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
3437507f 3.\"
c2a1289d 4.\" %sccs.include.redist.roff%
3437507f 5.\"
c2a1289d 6.\" @(#)ex.1 6.9 (Berkeley) %G%
f35cac8e
CL
7.\"
8.Dd
9.Dt EX 1
10.Os BSD 4
11.Sh NAME
12.Nm ex , edit
13.Nd text editor
14.Sh SYNOPSIS
15.Nm ex
16.Op Fl
17.Op Fl v
18.Op Fl t Ar tag
19.Op Fl r
20.Oo
c2a1289d
CL
21.Op Cm + Ns Ar command
22.Oc
f35cac8e
CL
23.Op Fl l
24.Ar name
25\&...
26.Nm edit
27.Op ex options
28.Sh DESCRIPTION
c2a1289d 29.Nm \&Ex
3437507f 30is the root of a family of editors:
f35cac8e
CL
31.Nm edit ,
32.Nm ex
3437507f 33and
f35cac8e 34.Nm vi .
c2a1289d 35.Nm \&Ex
3437507f 36is a superset of
f35cac8e 37.Xr ed ,
3437507f
KM
38with the most notable extension being a display editing facility.
39Display based editing is the focus of
c2a1289d
CL
40.Xr vi 1
41and requires a
42.Tn CRT .
f35cac8e 43.Pp
c2a1289d 44For users unfamiliar with
f35cac8e 45.Xr ed 1 ,
c2a1289d 46the editor
f35cac8e 47.Nm edit
c2a1289d 48is probably easier to learn.
3437507f 49It avoids some of the complexities of
f35cac8e 50.Nm ex
c2a1289d
CL
51used mostly by systems programmers and persons comfortable with the
52.Xr ed 1
53editor.
f35cac8e 54.Sh DOCUMENTATION
c2a1289d
CL
55The following documentation is found in the
56.Dq "\\*(tNUNIX\\*(fP User's Manual Supplementary Documents" :
57.Pp
58.%T "Edit: A tutorial"
59provides a comprehensive introduction to
f35cac8e 60.Nm edit
c2a1289d
CL
61assuming no previous knowledge of computers or the
62.Tn UNIX
f35cac8e
CL
63system.
64.Pp
c2a1289d 65.%T "Ex Reference Manual \- Version 3.7"
3437507f
KM
66is a comprehensive and complete manual for the command mode features
67of
f35cac8e 68.Nm ex ,
3437507f
KM
69but you cannot learn to use the editor by reading it.
70For an introduction to
71more advanced forms of editing using the command mode of
f35cac8e 72.Nm ex
3437507f 73see the editing documents written by Brian Kernighan for the editor
f35cac8e 74.Xr ed 1 ;
3437507f 75the material in the introductory and advanced documents works also with
f35cac8e
CL
76.Nm ex .
77.Pp
c2a1289d 78.%T "An Introduction to Display Editing with Vi"
3437507f 79introduces the display editor
f35cac8e 80.Xr vi 1
3437507f 81and provides reference material on
f35cac8e 82.Xr vi 1 .
3437507f 83In addition, the
c2a1289d 84.%T "Vi Quick Reference"
3437507f
KM
85card summarizes the commands
86of
f35cac8e 87.Xr vi 1
3437507f 88in a useful, functional way, and is useful with the
c2a1289d 89introduction.
f35cac8e
CL
90.Sh ENVIRONMENT
91The
92.Nm
93command uses the following environment variables.
c2a1289d
CL
94.Bl -tag -width TERMCAP
95.It Ev EXINIT
f35cac8e
CL
96User specified startup values for
97.Nm ex .
c2a1289d 98.It Ev HOME
f35cac8e
CL
99Default directory to search for
100the file
101.Pa ~/.exrc
c2a1289d 102.It Ev SHELL
f35cac8e
CL
103Shell used for
104.Em escaped
105commands (with the
106.Ic \&!
107command).
c2a1289d 108.It Ev TERM
f35cac8e 109Terminal type.
c2a1289d 110.It Ev TERMCAP
f35cac8e 111Alternate termcap file.
c2a1289d 112.El
f35cac8e 113.Sh FILES
c2a1289d
CL
114.Bl -tag -width /usr/libexec/ex?.?preserve -compact
115.It Pa /usr/libexec/ex?.?strings
f35cac8e 116error messages
c2a1289d 117.It Pa /usr/libexec/ex?.?recover
f35cac8e 118recover command
c2a1289d 119.It Pa /usr/libexec/ex?.?preserve
f35cac8e 120preserve command
c2a1289d 121.It Pa /usr/share/misc/termcap
f35cac8e 122describes capabilities of terminals
c2a1289d 123.It Pa ~/.exrc
f35cac8e 124editor startup file
c2a1289d 125.It Pa /tmp/Ex Ns Ar nnnnn
f35cac8e 126editor temporary
c2a1289d 127.It Pa /tmp/Rx Ns Ar nnnnn
f35cac8e 128named buffer temporary
c2a1289d 129.It Pa /var/preserve
f35cac8e 130preservation directory
c2a1289d 131.El
f35cac8e
CL
132.Sh SEE ALSO
133.Xr awk 1 ,
134.Xr ed 1 ,
135.Xr grep 1 ,
136.Xr sed 1 ,
137.Xr grep 1 ,
138.Xr vi 1 ,
139.Xr termcap 5 ,
140.Xr environ 7
141.Sh HISTORY
c2a1289d
CL
142.Nm \&Ex
143appeared in
144.Bx 3 .
f35cac8e 145.Sh BUGS
3437507f 146The
f35cac8e 147.Ic undo
3437507f
KM
148command causes all marks to be lost on lines changed and then restored
149if the marked lines were changed.
f35cac8e
CL
150.Pp
151.Ic Undo
3437507f 152never clears the buffer modified condition.
f35cac8e 153.Pp
3437507f 154The
f35cac8e 155.Ic z
3437507f
KM
156command prints a number of logical rather than physical lines.
157More than a screen full of output may result if long lines are present.
f35cac8e
CL
158.Pp
159File input/output errors don't print a name if the command line
160.Sq Fl
3437507f 161option is used.
f35cac8e 162.Pp
3437507f 163There is no easy way to do a single scan ignoring case.
f35cac8e 164.Pp
3437507f
KM
165The editor does not warn if text is placed in named buffers and not used
166before exiting the editor.
f35cac8e 167.Pp
3437507f
KM
168Null characters are discarded in input files, and cannot appear in resultant
169files.