Os parâmetros do terminal são armazenados como $LINES e $COLUMNS variables.
Além disso, você pode usar um programa de operação de termo especial, por exemplo tput :
tput lines # outputs the number of lines of the present terminal window.
tput cols # outputs the number of columns of the present terminal window.