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
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment