The format of the
tput command is illustrated below.
tput [options] capability [parameter ...] tput [options] longname tput [options] init tput [options] reset
tput takes the following options:
[-T terminal-type] [--terminal=terminal-type] [-t] [--termcap] [-S] [--standard-input] [-V] [--version]
Some string capabilities accept parameters, such as the number of lines to delete or the column to move to. These parameters are specified on the command line following the capability name. They are always numbers.
tputby default accepts termcap name if the capability a user specifies is not a terminfo name. This option tells
tputnot to try terminfo names and look up only termcap names.
tputto read a sequence of capabilities and parameters from the standard input. Only string capabilities can be used in this mode.
When `longname' is specified,
tput displays the
long descriptive name for the terminal type.
When `init' is specified,
tput sends the
initialization strings for the terminal. If the terminal's tab
width is other than 8, and it cannot be reset, the tab expansion
in the tty driver is turned on. Otherwise, tab width is reset to
8 and the tab expansion is turned off.
When `reset' is specified,
tput sends the
reset strings for the terminal and then follows the same
initialization sequence as
Below are some example uses of
tput. See section Capabilities, for
a complete list of the functions that
tput can cause terminals to
perform. Note that not all terminals can perform any given function.
See section Yet More Examples, for some more complex samples of
The following command moves the cursor to row 10, column 30 of the screen:
tput cup 10 30
The following command makes the cursor invisible:
The following command makes the cursor visible again:
The following command deletes 10 lines below and including the one on which the cursor is positioned:
tput dl 10
Go to the first, previous, next, last section, table of contents.