problem regarding tput cols
there is a command "#tput cols"
when i run this command in cli mode or linux terminal it gives result as 80 but i know that "#tput cols" is same as "#tput -Tlinux cols" because in "#tput cols" the value of terminal type is picked up from envoirement variable "TERM" (#echo $TERM) so both the above command should give the same result but they give different resuls #tput cols 80 #tput -Tlinux cols -1 i think the later one is correct because there is no capability named "cols" is defined for linux terminal in terminfo database(#infocmp) so "tput cols" should give the same result as -1 as "tput -tlinux cols" does pls help me why this command #tput cols runs prperly in linux terminal |
Code:
-Ttype indicates the type of terminal. Normally this option is unnecessary, because the |
hi
Quote:
|
Why not? There is no mention of that in the termutils manual. tput cols can be used even in a script like this:
Code:
#!/bin/bash |
hi
Quote:
|
hi
Quote:
but it should not run in cli mode because there is no capability named "cols" defined for linux terminal in terminfo database and u can check it by using command "#infocmp linux" and look in second row for the numeric capability |
All times are GMT -5. The time now is 07:14 PM. |