Record too long.......

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2009
Posts: 33
Reputation: axeeffect2002 is an unknown quantity at this point 
Solved Threads: 4
axeeffect2002 axeeffect2002 is offline Offline
Light Poster

Record too long.......

 
-1
  #1
Sep 23rd, 2009
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:-
Shell Scripting Syntax (Toggle Plain Text)
  1. 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.
Add to my reputation if you think I really helped you. :)
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,457
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 629
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Record too long.......

 
0
  #2
Sep 23rd, 2009
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.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 33
Reputation: axeeffect2002 is an unknown quantity at this point 
Solved Threads: 4
axeeffect2002 axeeffect2002 is offline Offline
Light Poster

Re: Record too long.......

 
0
  #3
Sep 23rd, 2009
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.
Add to my reputation if you think I really helped you. :)
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,457
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 629
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Record too long.......

 
0
  #4
Sep 23rd, 2009
I don't know what version of solaris you are running. Just google "Solaris N gawk", such as "Solaris 9 gawk":

Solaris 9: http://www.sunfreeware.com/programlistsparc9.html
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 33
Reputation: axeeffect2002 is an unknown quantity at this point 
Solved Threads: 4
axeeffect2002 axeeffect2002 is offline Offline
Light Poster

Re: Record too long.......

 
0
  #5
Sep 23rd, 2009
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?
Add to my reputation if you think I really helped you. :)
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,457
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 629
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Record too long.......

 
0
  #6
Sep 24th, 2009
Install it
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 9
Reputation: kranny is an unknown quantity at this point 
Solved Threads: 1
kranny kranny is offline Offline
Newbie Poster

Re: Record too long.......

 
1
  #7
Sep 26th, 2009
gunzip gawk-3.2.gz
pkgadd -d gawk-3.2
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 33
Reputation: axeeffect2002 is an unknown quantity at this point 
Solved Threads: 4
axeeffect2002 axeeffect2002 is offline Offline
Light Poster

Re: Record too long.......

 
0
  #8
Sep 26th, 2009
Thank you all for the help.
I installed gawk and it's working elegently.

Thanks again.
Add to my reputation if you think I really helped you. :)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 719 | Replies: 7
Thread Tools Search this Thread



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC