Terminal size

sys_terminal_size

Print the current terminal dimensions as rows and columns. Tries $LINES/$COLUMNS, then tput, then stty, then a raw ANSI cursor probe as a last resort.

Exit codes

  • 0: Always

Output on stdout

  • Two integers separated by a space: rows columns