[Melbourne-pm] View 132 column reports
brendon.oliver at redsheriff.com
Wed Mar 2 15:58:31 PST 2005
On Thu, 3 Mar 2005 09:49 am, Jim Kat wrote:
> Is there a Perl script that allows you to view a text
> file 132 column report without wrapping around.
> OS: SCO Unix
I doubt that you'll find a ready-written perl script to do this. What you
need to do is make sure that your terminal emulator is capable of
understanding the DECCOLM switch which will allow the terminal to switch
between 80/132 column mode.
In most cases, the sequence:
will put the screen into 132-col condensed mode, and
will switch back to normal 80-col mode.
I spent _ages_ many years go tinkering with this, trying to get 132-col
reports to view properly in 'less'. It can be a real PITA to get right (what
works for one terminal type never necessarily worked for another).
Once you get the sequences working, you might be able to wrap it in a shell
echo -e "\033[?3h"
echo -e "\033[?3i"
(FWIW, you can test this in "xterm -132" - it will jump to 132 col wide, but
it won't switch back to 80-col mode).
Hope this helps.
Lewis's Law of Travel:
The first piece of luggage out of the chute doesn't belong to anyone,
10:57:52 up 3 days, 23:39, 1 user, load average: 0.26, 0.10, 0.07
More information about the Melbourne-pm