|
Quick links About tput Syntax
Examples Related commands
Linux / Unix main page
About tput
Initialize a terminal or query terminfo database.
Syntax
tput [-T type] capname [parm]
tput -S <<
| -T type |
Indicates the type of terminal. Normally this option is unnecessary, because the default is
taken from the environment variable TERM. If -T is
specified, then the shell variables LINES and COLUMNS and the layer size will not be referenced. |
| capname |
Indicates the capability attribute from the
terminfo database.
The following strings will be supported as operands by the implementation in the "C" locale:
| clear |
Display the clear-screen sequence. |
| init |
If the terminfo database is present and an entry for the user's terminal exists (see
-Ttype, above), the following will occur:
- if present, the terminal's initialization strings will be output
(is1, is2, is3, if , iprog),
- any delays (for instance, newline) specified in the entry will be set
in the tty driver,
- tabs expansion will be turned on or off according to the
specifica tion in the entry, and
- if tabs are not expanded, standard tabs will be set (every 8 spaces). If an entry does not contain the information needed for any of the four above activities, that activity will silently be skipped.
|
| reset |
Instead of putting out initialization
strings, the terminal's reset strings will be output if present (rs1, rs2, rs3, rf). If the reset strings are not
present, but initialization strings are, the initialization strings will be
output. Otherwise, reset acts identically to init . |
|
If the terminfo database is present and an entry for the user's terminal exists (see
-Ttype above), then the long name of the terminal will be put out. The
long name is the last name in the first line of the terminal's description in the terminfo
database. |
|
| parm |
If the attribute is a string that takes
parameters, the argument parm will be instantiated into the string. An all numeric argument will be passed to the attribute as a number. |
| -S << |
Allows more than one capability per invocation of tput . The capabilities must be passed to tput from the standard input instead of from the
com mand line (see the example in the Examples
section). Only one capname is allowed per line. The -S option changes the meaning of the 0 and 1 boolean and string exit statuses (see the EXIT STATUS section). |
Examples
In the below example, the screen would be cleared and
move down 10 lines and over 10 spaces and should bold the prompt if
supported.
tput -S <<!
> clear
> cup 10 10> bold
> !
Related commands
clear
sh stty
tabs
|
|
| Resolved | Were you able to locate the answer to your questions? |
|
|