[comp.unix.xenix] Lines too long for vi and sed

compata@cup.portal.com (07/28/88)

Usually I keep a log file running when using kermit or pcomm to log into a
remote system.  This log file receives everything I receive, including escape
sequences.  Some systems send a large number of escapes to paint a screen of
information, and don't send any CR/LF controls.  The result is that sometimes
my log files have more than 510 characters between LFs (NLs to Xenix).  Later
when I try to edit these files, vi chokes.  I've tried using sed to clean them
up but it chokes in the same way, "line too long".  I've lost the last part
of many log files this way.

(I'm running SCO Xenix 386 2.2.3 including OS, DevSys, TxtPS, and VP/ix.)  

Is there a way to replace escape sequences with NLs, wholesale or selectively?
Is there another way to access these files so I can intelligently parse them
and extract the useful portions?

Dave Close, Compata, Arlington, Texas
compata@cup.portal.com

paul@csnz.nz (Paul Gillingwater) (08/01/88)

In article <7712@cup.portal.com> compata@cup.portal.com writes:
>Is there a way to replace escape sequences with NLs, wholesale or selectively?
>
>Dave Close, Compata, Arlington, Texas
>compata@cup.portal.com

Wholesale method:

tr -s "\033*" "\012" <file1 >file2

-- 
Paul Gillingwater, Computer Sciences	Call this BBS - Magic Tower (24 hours)
paul@csnz.nz  (vuwcomp!dsiramd!csnz)	NZ +64 4 753 561 8N1 TowerNet software
P.O.Box 929, Wellington, NEW ZEALAND	V21/V23/V22/V22bis/Bell 103/Bell 212A
Vox: +64 4 846194, Fax: +64 4 843924	"All things must parse"-ancient proverb