Views:
756
Votes: 5
Tag :
command-line
Link:
🔍 See Original Answer on Ask Ubuntu ⧉ 🔗
URL:
https://askubuntu.com/q/1503888
Title:
tput does not try /dev/tty (?)
ID:
/2024/02/18/tput-does-not-try-_dev_tty-___
Created:
February 18, 2024
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
The stated method always returns 24 x 80:
$ echo -e "lines\ncols" | tput -S >/tmp/xx 2>&1
$ cat /tmp/xx
24
80
To find the true height / width you can use this method:
$ stty size
30 92