I want to get the width and height of the current terminal.
What do i have to do, getting the $LINES and $COLUMNS variables in a
terminal to run?
My favorite shell is ‘sh’, and the help-system of Neutrino says that
they should exist.
Under Linux I would use something like that:
#> stty size 2>/dev/null|(read L C;echo LINES=${L:-24} COLUMNS=${C:-80})
But on Neutrino the ‘stty’ has no ‘size’ option.
stty -g | awk ‘{print $NF}’ | sed -e"s/rows=/ /" -e"s/,/ /" | (read L C;echo
LINES=${L:-24} COLUMNS=${C:-80})
“Marc Haas” <h_a_a_s_i_7_0@g_m_x.d_e> schrieb im Newsbeitrag
news:d61k0g$ds2$1@inn.qnx.com…
Hi,
I want to get the width and height of the current terminal.
What do i have to do, getting the $LINES and $COLUMNS variables in a
terminal to run?
My favorite shell is ‘sh’, and the help-system of Neutrino says that
they should exist.
Under Linux I would use something like that:
#> stty size 2>/dev/null|(read L C;echo LINES=${L:-24} COLUMNS=${C:-80})
But on Neutrino the ‘stty’ has no ‘size’ option.