Search Results

Search: Posts Made By: dude2cool
11,938
Posted By dude2cool
Try this: $ gawk 'NR==FNR{ a[$1] += $3;...
Try this:


$ gawk 'NR==FNR{ a[$1] += $3; b[$1]++} NR!=FNR{ for(key in a) {if($1==key)print key,a[key]/b[key]}}' /tmp/1 /tmp/2
Mam189 72.4167
Mam426 78.6133

I used the following sample files:
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy