Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tput(1) — HP-UX 5.50

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stty(1)

terminfo(4)

TPUT(1)  —  HP-UX

NAME

tput − query terminfo database

SYNOPSIS

tput [ −T type  ]  capname

DESCRIPTION

Tput uses the terminfo (4) database to make terminal-dependent capabilities and information available to the shell.  Tput outputs 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 does no output. 

-Ttype indicates the type of terminal.  Normally this flag is unnecessary, as the default is taken from the environment variable $TERM. 

Capname indicates the attribute from the terminfo database.  See terminfo (4). 

EXAMPLES

tput clear Echo clear-screen sequence for the current terminal. 

tput cols Print the number of columns for the current terminal. 

tput -Thp2623 cols
Print the number of columns for the hp2623 terminal.

bold=‘tput smso‘
Set shell variable "bold" to stand-out mode sequence for current terminal. This might be followed by a prompt:
echo "${bold}Please type in your name: \c"

tput hc Set exit code to indicate if current terminal is a hardcopy terminal. 

FILES

/usr/lib/terminfo/?/* Terminfo data base
/usr/include/curses.h
/usr/include/term.h Definition files

DIAGNOSTICS

Tput prints error messages and returns the following error codes on error:

-1 Usage error. 
-2 Bad terminal type. 
-3 Bad capname. 

In addition, if a capname is requested for a terminal that has no value for that capname (e.g., tput -Thp2623 vt), -1 is printed. 

SEE ALSO

stty(1), terminfo(4). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026