Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-13-2012
saj saj is offline
Registered User
 
Join Date: Apr 2011
Posts: 29
Thanks: 4
Thanked 0 Times in 0 Posts
awk: record too long

Hi All ,
I am getting record too long for the below command .


Code:
nawk -F\" '{a[$1]=a[$1]" "$2} END{for(i in a) print i,a[i] }' test|sort|awk '{for(i=1;i<=NF;i++) t[i]=t[i]"\t"$i;if(NF>max)max=NF} END{for(i=1;i<=max;i++)print t[i] }'

File test has 850 records ...

Please help..

Last edited by joeyg; 06-13-2012 at 01:55 PM.. Reason: Please wrap data and sripts with CodeTags
Sponsored Links
    #2  
Old 06-13-2012
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Location: Out running a Marathon.
Posts: 2,189
Thanks: 46
Thanked 126 Times in 118 Posts
Hard to tell without seeing
sample data file
exact error message

By the way, confused about your test command, as part of

Code:
test|sort|awk

Sponsored Links
    #3  
Old 06-14-2012
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
 
Join Date: Oct 2003
Location: 54.23, -4.53
Posts: 1,792
Thanks: 1
Thanked 101 Times in 91 Posts
That second awk should probably be nawk
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Record too long error while running awk Devesh5683 Shell Programming and Scripting 3 03-30-2012 11:36 AM
Determine differient IP in a very long record. jimmy_y Shell Programming and Scripting 10 06-24-2009 02:18 PM
Split long record into csv file wvdeijk Shell Programming and Scripting 10 05-07-2009 03:45 PM
Record Length too long -- AWK Problem venkatajay_18 Shell Programming and Scripting 2 03-05-2007 03:15 PM
Record too long for awk vibhor_agarwali UNIX for Dummies Questions & Answers 2 01-29-2005 02:14 AM



All times are GMT -4. The time now is 05:46 AM.