tput-initializes a terminal or queries the terminfo database

 <  Day Day Up  >  

tput ”initializes a terminal or queries the terminfo database

 tput [ Ttype ] capname [ parms...] tput [ Ttype ] init tput [ Ttype ] reset tput [ Ttype ] longname tput S << 

tput uses the terminfo database to make the values of terminal-dependent capabilities and information available to the shell (see sh ), to initialize or reset the terminal, or return the long name of the requested terminal type.

Example A.62.
 1   tput longname 2   bold=`tput smso`     unbold=`tput rmso`     echo "${bold}Enter your id: ${offbold}\c" 

EXPLANATION

  1. Displays a long name for the terminal from the terminfo database.

  2. Sets the shell variable bold to turn on the highlighting of displayed text. Then sets the shell variable unbold to return to normal text display. The line Enter your id: is highlighted in black with white letters . Further text is displayed normally.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net