TPUT(1) BSD Reference Manual TPUT(1)
tput - terminal capability interface
tput [-T term] attribute [attribute-args] ... tput [-T term] -S clear
The tput utility makes terminal-dependent information available to users or shell applications. The clear utility clears your screen; it is equivalent to calling tput clear. The options are as follows: -T The terminal name as found in the terminfo database; for example, "vt100" or "xterm". If not specified, tput retrieves the TERM variable from the environment. -S The attributes are read from stdin instead of the command line. tput outputs a string if the attribute is of type string or a number if it is of type integer. If the attribute is of type boolean, tput exits 0 if the terminal has the capability or 1 if it does not. Each attribute should be a string defined in either terminfo(5) or termcap(5). 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: clear Clear the screen (the terminfo "clear" sequence). init Print the terminfo initialization strings for the specified terminal. longname Print the descriptive name of the user's terminal type. reset Reset the terminal (using the terminfo reset sequences).
tput clear cup 5 10 clear the screen and goto line 5 column 10 tput cup 6 11 dch 6 goto line 6 column 11 and delete 6 characters
The exit value of tput is based on the last attribute specified. If the attribute is of type string or of type integer the exit value is as fol- lows: 0 The requested string was written successfully. 2 Usage error. 3 Unknown terminal type. 4 Unknown attribute name. >4 An error occurred. If the attribute is of type boolean, tput exits with a value of 0 if the terminal has this attribute or 1 if it does not.
The tput utility appeared in 4.4BSD.
tput can't really distinguish between different types of attributes. MirOS BSD #10-current June 29, 1999 1
Generated on 2013-10-31 22:57:03 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.