Operating System - HP-UX
1833767 Members
2692 Online
110063 Solutions
New Discussion

awk and lines wirh more than 199 fields

 
SOLVED
Go to solution
Sébastien N
Advisor

awk and lines wirh more than 199 fields

Hi,

I want to use awk on lines containning more than 199 fields to sum values of these lines.

Awk limits the number of fieds to 199 :-(

How to do to use awk in this case ?

Thanx !
Sebastien.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: awk and lines wirh more than 199 fields

Your best bet is to use the GNU version of awk, gawk. It has no predefined limits as to record size or number of field and is compleytely compatible with your existing code. It's a better awk then awk.
http://gatekeep.cs.utah.edu/hppd/hpux/Gnu/gawk-3.1.1/man.html
If it ain't broke, I can fix that.
Tom Maloy
Respected Contributor

Re: awk and lines wirh more than 199 fields

Definitely gawk.

Of course, you could always switch to perl...
Carpe diem!