using awk with records that have over 100 fields

Tom Christiansen tchrist at convex.COM
Tue Jan 1 07:07:23 AEST 1991


>From the keyboard of plantz at manta.NOSC.MIL (Glen W. Plantz):
:The problem I've had so far with our version of "awk", is that the lines
:(paragraphs) that have too many fields cause an error of the type:
:	547
:awk: record `   479 Provide techn...' has too many fields
: record number 4
:
:These "_LONG_" lines could have several hundred words on them.  How can
:I get awk or another unix utilitity to process this text?

Run your awk script through the awk-to-perl translator, a2p, then run perl
on the resulting script as perl has no such limitations.  By default, the
translator will convert awk splits into perl splits with a maximum number
of resulting field of 999, but you can easily increase or remove that
restriction.

--tom
--
Tom Christiansen		tchrist at convex.com	convex!tchrist
"With a kernel dive, all things are possible, but it sure makes it hard
 to look at yourself in the mirror the next morning."  -me



More information about the Comp.unix.questions mailing list