The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: array problem
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-09-2007
shary shary is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 61
array problem

Dear Summit,

thank you so much for replying me i really appreciate you
but please can you expalin me this
{sum[$1,$2,$3]+=$4}
what does this mean in array coz my array concept is weak and the other thing i want to store only 3rd field but in your case it seems to be stored 1,2,3 fileds right .
the data might be 1000 line in my text file so please can you brief it out your command
awk -F, '{sum[$1,$2,$3]+=$4} END {for (i in sum) print i, sum[i]}' data.

Regards,
Shary