tput(1) tput(1)NAME tput - queries terminfo database SYNOPSIS tput [-Ttype] capname ARGUMENTS -Ttype Indicates the type of terminal. Normally this option is unnecessary, as the default is taken from the environment variable $TERM. capname Indicates the attribute from the terminfo database. See terminfo(4). DESCRIPTION tput uses the terminfo database to make terminal-dependent capabilities and information available to the shell. The tput command generates a string if the attribute (capability name) is of type string, or an integer if the attribute is of type integer. If the attribute is of type boolean, tput simply sets the exit code (0 for TRUE, 1 for FALSE), and generates no output. EXAMPLES To echo the clear-screen sequence for the current terminal, enter: tput clear To print the number of columns for the current terminal, enter: tput cols To print the number of columns for the 450 terminal, enter: tput -T450 cols To set the shell variable bold to standout mode sequence for current terminal, enter: bold=`tput smso` This might be followed by a prompt: echo "${bold}Please type in your name: \c" To set exit code to indicate if current terminal is a hardcopy terminal, enter: tput hc January 1992 1
tput(1) tput(1)STATUS MESSAGES AND VALUES -1 Usage error -2 Bad terminal type -3 Bad capname If a capname is requested for a terminal that has no value for that capname (for example, tput -T450 lines), -1 is printed. FILES /usr/bin/tput Executable file /usr/lib/terminfo/?/* Terminal descriptor files /usr/include/term.h Definition files /usr/include/curses.h Terminal information file SEE ALSO stty(1) terminfo(4) in A/UX Programmer's Reference 2 January 1992