home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

tput

tput [options ] capname [arguments ]

Print the value of the terminal capability capname (and its associated numeric or string arguments ) from the terminfo database. capname is a terminfo capability such as clear or col . (See termcap & terminfo , which is listed in the Bibliography.) The last five options are mutually exclusive and are not used when specifying a capname .

Exit statuses are:

0

When a Boolean capname is set to true or when a string capname is defined

1

When a Boolean is false or when a string is undefined

2

For usage errors

3

For unknown terminal type

4

For unknown capname

Options

-T type

Print the capabilities of terminal type (default is the terminal in use).

-S

Read capname from standard input (this allows tput to evaluate more than one capname ).

clear

Print the clear-screen sequence. Solaris only.

init

Print initialization strings and expand tabs.

reset

Print reset strings if present; act like init if not.

longname

Print the terminal's long name.

Examples

Show the number of columns for the xterm terminal type:

tput -Txterm cols

Define shell variable restart to reset terminal characteristics:

restart=`tput reset`


Previous: Reference: touch UNIX in a Nutshell: System V Edition Next: Reference: tr
Reference: touch Book Index Reference: tr

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru