QNX Neutrino - Terminal dimension
01/10/2018 10:46
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.

Regards,Marc

Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
01/10/2018 10:46 - a little bit long but works.

try: stty -g | awk '{print $NF}' | sed -es/rows=/ / -es/,/ / | (read L C;echoLINES=${L:-24} COLUMNS=${C:-80}) Marc Haas <_h_a_a_s_i_7_0_@_g_m_x_._d_e_> schrieb im Newsbeitragnews:d61k0g$ds2$1@inn.qnx.com...


Source is Usenet: comp.os.qnx
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below