Get screen width and hight with tput
From Linux Shell Scripting Tutorial - A Beginner's handbook
Type the following command at a shell prompt to get screen width:
tput cols
Sample outputs:
157
You can get and export screen width with the shell variable called COLUMNS (used by the select builtin command to determine the terminal width when printing selection lists):
COLUMNS=$(tput cols) export COLUMNS
To get height, enter:
tput lines
Sample outputs:
56