Hi
my inFile has 3 fields with duplicates in field1.
I would like to print the average field2 and field3 for the duplicated fild1.
thank you for your help.
my inFile has 3 fields with duplicates in field1.
I would like to print the average field2 and field3 for the duplicated fild1.
Code:
$cat inFile
field1 field2 field3
A 7 2
B 4 2
B 2 3
C 6 5
D 15 2
D 5 3
D 10 4
Code:
$cat outFile
field1 field2 field3
A 7 2
B 3 2.5
C 6 5
D 10 3