Unix Shell - Re: Clipping 21x40 console window - ok gotit

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2006 > Re: Clipping 21x40 console window - ok gotit





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Clipping 21x40 console window - ok gotit
Hufnus

2006-12-15, 7:25 pm

On Thu, 14 Dec 2006 21:53:42 -0800
Hufnus <tonyb@sysdev.org> wrote:

> This sample script can set the window fine for me, but
> I need to add line clipping so that output does not wrap
> around...
>
> #!/bin/sh
> #
> # Set 40x21 window
> LINES=21 export LINES
> stty rows 21
> stty cols 40
> tput csr 0 20; tput clear; tput cup 20 0
>
> ps -we fx --header | more
> sleep 10
>
> # Reset screen
> LINES=25 export LINES
> stty rows 25
> stty cols 80
> tput csr 0 24; tput clear; tput cup 24 0


Ok, got it, this did it, FYI thanks

---------

#!/bin/sh
#

# Set 40x21 window
LINES=21 export LINES
COLUMNS=40 export COLUMNS
stty rows 21
stty cols 40
tput csr 0 20; tput clear; tput cup 20 0

/bin/sh

# Reset screen
LINES=25 export LINES
COLUMNS=80 export COLUMNS
stty rows 25
stty cols 80
tput csr 0 24; tput clear; tput cup 24 0
/bin/stty sane
/usr/bin/reset
/usr/bin/setfont
##/bin/emit at 1 1
##/bin/emit curon



There are 10 types of people in this world, those that read
binary and those who don't!

--
__ __ _ I N C. http://www.sysdev.org
/ __|\\// __|| \ __ __ / tonyb@sysdev.org
\__ \ \/\__ \||)|/ O_)\/ / \/ System Tools / Utilities
|___/ || ___/|_ /\___|\_/ WIntel / Linux Device Drivers

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com