4.4BSD snapshot (revision 8.1)
[unix-history] / usr / src / usr.bin / ul / ul.1
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" %sccs.include.redist.man%
.\"
.\" @(#)ul.1 6.3 (Berkeley) %G%
.\"
.Dd
.Dt UL 1
.Os BSD 4
.Sh NAME
.Nm ul
.Nd do underlining
.Sh SYNOPSIS
.Nm ul
.Op Fl i
.Op Fl t Ar terminal
.Op Ar name Ar ...
.Sh DESCRIPTION
.Nm Ul
reads the named files (or standard input if none are given)
and translates occurrences of underscores to the sequence
which indicates underlining for the terminal in use, as specified
by the environment variable
.Ev TERM .
The file
.Pa /etc/termcap
is read to determine the appropriate sequences for underlining.
If the terminal is incapable of underlining, but is capable of
a standout mode then that is used instead.
If the terminal can overstrike,
or handles underlining automatically,
.Nm ul
degenerates to
.Xr cat 1 .
If the terminal cannot underline, underlining is ignored.
.Pp
The following options are available:
.Bl -tag -width Ds
.It Fl i
Underlining is indicated by a separate line containing appropriate
dashes `\-'; this is useful when you want to look at the underlining
which is present in an
.Xr nroff
output stream on a crt-terminal.
.It Fl t Ar terminal
Overrides the terminal type specified in the environment with
.Ar terminal .
.El
.Sh ENVIRONMENT
The following environment variable is used:
.Bl -tag -width TERM
.It Ev TERM
The
.Ev TERM
variable is used to relate a tty device
with its device capability description (see
.Xr termcap 5 ) .
.Ev TERM
is set at login time, either by the default terminal type
specified in
.Pa /etc/ttys
or as set during the login process by the user in their
.Pa login
file (see
.Xr setenv 1 ) .
.El
.Sh SEE ALSO
.Xr man 1 ,
.Xr nroff 1 ,
.Xr colcrt 1
.Sh BUGS
.Xr Nroff
usually outputs a series of backspaces and underlines intermixed
with the text to indicate underlining. No attempt is made to optimize
the backward motion.
.Sh HISTORY
The
.Nm
command appeared in
.Bx 3.0 .