Всем доброго!
Вот нашел на Rosettacode
set width [exec tput cols]
set height [exec tput lines]
puts "The terminal is $width characters wide and has $height lines"
#!/bin/sh
WIDTH=`tput cols`
HEIGHT=`tput lines`
echo "The terminal is $WIDTH characters wide and has $HEIGHT lines."