|TPUT(1)||FreeBSD General Commands Manual||TPUT(1)|
NAMEtput, clear — terminal capability interface
|tput||[ -T term] attribute ...|
DESCRIPTIONThe tput utility makes terminal-dependent information available to users or shell applications. When invoked as the clear utility, the screen will be cleared as if
had been executed. The options to tput are as follows:
- The terminal name as specified in the termcap(5) database, for example, “vt100” or “xterm”. If not specified, tput retrieves the “ TERM” variable from the environment.
The tput utility outputs a string for each attribute that is of type string; a number for each of type integer. Otherwise, tput exits 0 if the terminal has the capability and 1 if it does not, without further action.
If an attribute is of type string, and takes arguments (e.g. cursor movement, the termcap “cm” sequence) the arguments are taken from the command line immediately following the attribute.
The following special attributes are available:
EXIT STATUSThe exit status of tput is as follows:
- If the last attribute attribute argument is of type string or integer, its value was successfully written to standard output. If the argument is of type boolean, the terminal has this attribute.
- This terminal does not have the specified boolean attribute.
- Usage error.
- No information is available about the specified terminal type.
STANDARDSThe tput utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”).
HISTORYThe tput utility appeared in 4.4BSD.
BUGSThe tput utility cannot really distinguish between different types of attributes.
Some termcap entries depend upon having a ‘%’ in them that is just a ‘%’ and nothing more. Right now we just warn about them if they do not have a valid type declaration. These warnings are sent to stderr.
|June 15, 2002||FreeBSD|