Terminal get screen size in width and columns

Use tput cols to tell you the number of columns and use tput lines to tell you the number of rows.

$ tput cols
100
$ tput lines
20
This post is available on GitHub.
Posted .

Comments

Leave a Reply