Hi,
I am trying to log a portion of the log file depending upon the "WorkOrderNumber" and "level".
The shell script i've written is as follows:-

cat input.log | awk '/\[WorkOrderNumber/' | awk /120600012/ | awk /INFO/ | tee log.vw

For a particular WorkOrderNumber, the record is very long (4253 characters).

When I run the script I get following message:-

awk: record `[2009-09-17 08:26]IN...' too long
record number 882

How to get rid of this error?
I don't want to tamper with input.log file.

Please help.

Recommended Answers

Is this a solaris machine? You can try using GNU's awk which won't throw this error. The name for it is "gawk". You should be able to get solaris package files for GNU utils. I think

Jump to Post

gunzip gawk-3.2.gz
pkgadd -d gawk-3.2

Jump to Post

All 7 Replies

Is this a solaris machine? You can try using GNU's awk which won't throw this error. The name for it is "gawk". You should be able to get solaris package files for GNU utils. I think www.ibiblio.org has them on their FTP site.

Yes!!! It's Solaris box indeed.

Will you please clarify more about how to "to get solaris package files for GNU utils"???

Please explain me thinking that you're explaining to a dimwit. :D

Sorry. My bad.
Here goes my Solaris version...
version 2.05.0(1)-release (sparc-sun-solaris2.9)

I have downloaded gawk-3.0.2. what next?

Install it

gunzip gawk-3.2.gz
pkgadd -d gawk-3.2

commented: I forgot the commands :) +17

Thank you all for the help.
I installed gawk and it's working elegently.

Thanks again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.