Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a script that runs a series of scripts numbered 001,002,003,004... etc down to 041 right now, will be more in the future - and these scripts them selves use some cursor control to print a progress bar and other status information and get the width and height of the terminal from tput cols and tput lines respectively.

Without rewriting the sub-scripts, I would like to reserve one line at the bottom for overall status information for the outer script. I was curious if there was a way to set what tput replies for lines and cols.

There must be a way because tmux achieves it. I was thinking there may be an environmental variable but the only change I can see that tmux makes when running env is setting the $TERM to screen.

Any help would be greatly appreciated

share|improve this question
    
WRT tmux, the stuff in that is running inside tmux, which provides multiple shells and windows. Ie, it is not doing this via shell commands. So going that route means writing a pretty serious application. –  TAFKA 'goldilocks' Dec 19 '12 at 19:27
    
Well it has to be altering something tput is reading, I tried looking up the source of tput but didn't understand it at all –  donatJ Dec 19 '12 at 20:36
add comment

1 Answer

up vote 1 down vote accepted

The following will let you customize the number of lines and cols tput returns

export LINES=1000
export COLUMNS=1000
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.