Skip to Content
Pro Bash Programming: Scripting the GNU/Linux Shell
book

Pro Bash Programming: Scripting the GNU/Linux Shell

by Chris F.A. Johnson
October 2009
Beginner to intermediate
242 pages
5h 4m
English
Apress
Content preview from Pro Bash Programming: Scripting the GNU/Linux Shell

CHAPTER 14Scripting the Screen

Unix purists will shake their heads over this chapter. Traditionally, screen manipulation is done through the termcap or terminfo database that supplies the information necessary to manipulate any of dozens or even hundreds of types of terminals. The shell interface to the database is an external command, tput.

On some systems, tput uses the termcap database; on others (mostly newer systems), it uses the terminfo database. The commands for the two databases are not the same, so a tput command written for one system may not work on another.

On one system, the command to place the cursor at the 20th column on the 10th row is as follows:

tput cup 9 19

On another system, this is the command:

tput cm 19 9

These commands ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Bash Programming : Scripting the GNU/Linux Shell, Second Edition

Pro Bash Programming : Scripting the GNU/Linux Shell, Second Edition

Chris F. A. Johnson, Jayant Varma
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar

Publisher Resources

ISBN: 9781430219972Purchase book