using awk with records that have over 100 fields
WU SHI-KUEI
skwu at boulder.Colorado.EDU
Wed Jan 2 06:02:59 AEST 1991
In article <1990Dec31.200723.7929 at convex.com> tchrist at convex.COM (Tom Christiansen) writes:
>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 ......
No need for 'perl', a boon to the majority of UNIX users that do not use it.
Simply replace the first, white space field separator with a some, otherwise
unused glyph (i.e. @) using 'sed' and then set the awk FS to that glyph.
More information about the Comp.unix.questions
mailing list