From time to time I have to write shell programs that should print big amounts of text to the terminal. In these situations it would be nice to know at least the horizontal dimension of the terminal to be able to mess for example with the indentation of the lines. So far I always simply took 80 (the default with of most terminal), but thanks to a recipe in the Python Cookbook (Recipe 1.25 by Brent Burley and Mark Moraes) I now know the tput command :)
Archive for 2007/03/04
-
Know your terminal with tput