TPUT(1) DOMAIN/IX Reference Manual (SYS5) TPUT(1)
NAME
tput - query terminfo database
USAGE
tput [ -T type ] capname
DESCRIPTION
The tput command uses the terminfo (4) database to make
terminal-dependent capabilities and information available to
the Shell. If the attribute cap(ability) name is of type
string, tput outputs a string. If it is of type integer,
tput outputs an integer. If the attribute is of type
boolean, tput simply sets the exit code (0 for TRUE, 1 for
FALSE), and does no output.
OPTIONS
-Ttype Specify the terminal type. Normally this flag
is unnecessary, as the default is taken from
the TERM environment variable.
capname Indicate the attribute from the terminfo(4)
database.
EXAMPLES
tput clear Echo clear-screen sequence for the
current terminal.
tput cols Print the number of columns for the
current terminal.
tput -TVT100 cols Print the number of columns for the
VT100 terminal.
tput hc Set exit code to indicate if current
terminal is a hardcopy terminal.
FILES
/usr/lib/terminfo/?/* terminal descriptor files
/usr/include/term.h definition files
/usr/include/curses.h
DIAGNOSTICS
The tput command returns the following error codes:
-1: Usage error, or terminal has no value for the specified capname.
-2: Bad terminal type.
-3: Bad capname.
RELATED INFORMATION
stty(1)
Printed 1/27/86 TPUT-1
TPUT(1) DOMAIN/IX Reference Manual (SYS5) TPUT(1)
terminfo(4)
TPUT-2 Printed 1/27/86