CHAPTER 10

image

Screenplay: The screen–funcs Library

Data Entry on terminal screens involved positioning the cursor on the screen at various places, displaying pieces of information in bold or reverse text. The usual method of positioning the cursor and setting attributes such as bold and reverse involves tput, a Unix utility that outputs screen codes for the particular terminal or terminal emulation you are using. Even with processors running at multigigahertz speeds, calling an external command multiple times can produce a noticeable delay.

For a certain project, Chris took the easy way out and placed the cursor-positioning codes for terminals in ...

Get Shell Scripting Recipes: A Problem-Solution Approach, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.