Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

record too long

Status
Not open for further replies.

frogwipe

Technical User
May 26, 2003
2
US
I am trying to break up a file into two fields. The second field being about 400 lines long using the following code:

awk '{FS=" ";RS="|"} ; {print $1}' letter.bcp

and I get the following error:

awk: record `{\colortbl\red0\gree...' too long
record number 1

Can anyone help me with this?
 
if on Solaris, try using either /usr/bin/nawk OR /usr/cpg4/bin/awk

If you have gawk handy try using it as well. You record is quite lengthy - I'm not sure if either one of the above will be able to handle it. (I don't quite remember the limitations as far at the record length is concerned.)

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
I agree to vlad, the limitations on standard awk are quite restrictive. I had a similar problem and using nawk instead solved my problem.
 
Thanks for that. I have used perl instead and it works a treat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top