Skip to content

Instantly share code, notes, and snippets.

@fcojperez
Created November 14, 2025 19:26
Show Gist options
  • Select an option

  • Save fcojperez/a0ec0913b3a87d7aaeeab8a217afaa80 to your computer and use it in GitHub Desktop.

Select an option

Save fcojperez/a0ec0913b3a87d7aaeeab8a217afaa80 to your computer and use it in GitHub Desktop.
How to check a Bash Terminal Window Size
#!/usr/bin/env bash
shopt -s checkwinsize
# This line is intended to execute a external command in order to set up variables COLUMNS and LINES
(:)
echo "COLUMNS: $COLUMNS LINES: $LINES"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment