Determine the height and width of the terminal, and store this information into variables for subsequent use.

#!/bin/sh
WIDTH=`tput cols`
HEIGHT=`tput lines`
echo "The terminal is $WIDTH characters wide and has $HEIGHT lines."