TPUT(1) | General Commands Manual | TPUT(1) |
tput
, clear
—
tput |
[-T term]
attribute [attribute-args]
... |
tput
makes terminal-dependent information available to
users or shell applications. The options are as follows:
-T
tput
retrieves the
“TERM
” variable from the
environment.tput
outputs a string if the
attribute is of type string; a number if it is of type
integer. Otherwise, tput
exits 0 if the terminal has
the capability and 1 if it does not, without further action.
If the attribute is of type string, and takes arguments (e.g. cursor movement, the terminfo “cup” sequence) the arguments are taken from the command line immediately following the attribute.
The following special attributes are available:
tput
is based on the last attribute
specified. If the attribute is of type string or of type integer,
tput
exits 0 if the attribute is defined for this
terminal type and 1 if it is not. If the attribute is of type boolean,
tput
exits 0 if the terminal has this attribute, and 1
if it does not. tput
exits 2 if any error occurred.
tput
cl cm 5 10
tput
cm 6 11 DC 6
tput
command appears in
4.4BSD.
tput
can't really distinguish between different types of
attributes.
Not all terminfo entries contain the reset sequence, so using the init sequence may be more useful.
April 5, 2012 | NetBSD 9.4 |