LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-06-2004, 08:11 AM   #1
subu_s
Member
 
Registered: Jun 2004
Posts: 36

Rep: Reputation: 15
tput - determining window size


Hi,
Is it possible to determine the current height and width of my terminal window using tput?

Thanks in advance,
Subu
 
Old 12-06-2004, 09:21 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
Most shells support two variables:
COLUMNS
LINES

Code:
echo "my terminal is $COLUMNS x  $LINES"
 
Old 12-06-2004, 10:46 PM   #3
subu_s
Member
 
Registered: Jun 2004
Posts: 36

Original Poster
Rep: Reputation: 15
Found it:-
echo "Your terminal is of size `tput lines` * `tput cols`"

Last edited by subu_s; 12-16-2004 at 04:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
determining directory size supersucker Linux - Newbie 2 05-12-2005 12:47 PM
Window Size crashanburn Red Hat 0 02-11-2005 12:20 PM
window size box_l Linux - Software 3 10-09-2004 12:07 PM
determining active x window tcorreia Programming 1 08-22-2004 05:52 AM
determining active x window tcorreia Linux - General 1 08-20-2004 03:55 AM


All times are GMT -5. The time now is 04:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration