Search Results

Search: Posts Made By: jwbucha
1,978
Posted By Scrutinizer
Sure, no problem: awk ' ...
Sure, no problem:
awk '
NR==1 # If it is the first line in the file it is the header, perform the default action, i.e. print the line { print $0 }
...
1,978
Posted By Scrutinizer
OK, try something like: awk 'NR==1;...
OK, try something like:
awk 'NR==1; NR>1{A[$2]+=$3; C[$2]++} END{for (i in A) print i,A[i]/C[i]}' OFMT='%.2f' file
Showing results 1 to 2 of 2

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