May 2013
Beginner to intermediate
384 pages
7h 40m
English
While writing command-line shell scripts, we will often need to heavily manipulate information about the current terminal, such as the number of columns, rows, cursor positions, masked password fields, and so on. This recipe helps in collecting and manipulating terminal settings.
tput and stty are utilities that can be used for terminal manipulations. Let us see how to use them to perform different tasks.
There are specific information you can gather about the terminal as shown in the following list:
tput cols tput lines
tput longname
Read now
Unlock full access