Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tput(1) — OSF/1 1.0 (TIN) MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stty(1)

terminfo(4)

tput(1)  —  Commands

OSF

NAME

tput − Queries the terminal information database

SYNOPSIS

tput [-T][type] capability_name

The tput command uses the terminfo database to make terminal-dependent information available to the shell. 

FLAGS

-TtypeSpecifies the type of terminal.  By default, the value of type is taken from the environment variable $TERM. 

DESCRIPTION

The capability_name argument indicates the attribute from the terminfo file.  The output of tput is a string if the attribute capability_name is of the type string, or an integer if the attribute is of the type integer.  If capability_name is of the type Boolean, tput sets the exit value (0 for true, 1 for false) and produces no other output.  For more information, see terminfo(4). 

EXAMPLES

     1.To echo the clear-screen sequence for the current terminal, enter:

tput clear

     2.To display the number of columns for the current terminal, enter:

tput cols

     3.To set and unset the highlight-mode sequences for the current terminal, enter:

set bold="‘tput smso‘"
set unbold="‘tput rmso‘"

This can be followed by a prompt:

echo "${bold}Please enter your name:${unbold}

     4.To set the exit value to indicate if the current terminal is a hard-copy terminal, enter:

tput  hc

FILES

/usr/share/lib/terminfo/?/∗
Terminal information database.

/usr/include/term.hDefinition files. 

/usr/include/curses.hcurses library definition file. 

RELATED INFORMATION

Commands:  stty(1). 

Files:  terminfo(4). 

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