Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!ncar!csn!news From: skwu@boulder.Colorado.EDU (WU SHI-KUEI) Newsgroups: comp.unix.questions Subject: Re: using awk with records that have over 100 fields Keywords: awk Message-ID: <1991Jan1.190259.868@csn.org> Date: 1 Jan 91 19:02:59 GMT References: <1560@manta.NOSC.MIL> <1990Dec31.200723.7929@convex.com> Sender: news@csn.org Reply-To: skwu@spot.Colorado.EDU (WU SHI-KUEI) Organization: University of Colorado, Boulder Lines: 17 Nntp-Posting-Host: spot.colorado.edu In article <1990Dec31.200723.7929@convex.com> tchrist@convex.COM (Tom Christiansen) writes: >From the keyboard of plantz@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.