Splitting up a too-wide text file

Tom Christiansen tchrist at convex.COM
Fri Mar 15 11:22:31 AEST 1991


>From the keyboard of jik at athena.mit.edu (Jonathan I. Kamens) come various
solution for truncating lines.  But I don't think that's what he wanted.
he has things like this:

            (col)

        0       80
1       a b c d e f g h i j
2       a b c d e f g h i j
3       a b c d e f g h i j
4       a b c d e f g h i j
....

and wants this
1       a b c d e
2       a b c d e
3       a b c d e
4       a b c d e
(now at page break, the stuff you chopped)
1       f g h i j
2       f g h i j
3       f g h i j
4       f g h i j


i'm not sure how best to do that.  he wants to chop at fields, not columns,
but doesn't want it to go over col 80, and he wants that stuff chopped
off placed on the next page.  i could certainly do it with a perl 
script, but was hoping for a quick cut and paste solution.

--tom



More information about the Comp.unix.questions mailing list