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

set width [exec tput cols]
set height [exec tput lines]
puts "The terminal is $width characters wide and has $height lines"