Hi ,
Below is my sample data,I have this 8 column(A,B,C,D,E,F,G,H) in csv file.
A , B ,C ,D ,E ,F,G ,H
4141,127337,24,15,20,69,72.0,-3
4141,128864,24,15,20,65,66.0,-1
4141,910053,24,15,4,4,5.0,-1
4141,910383,24,15,22,3,4.0,-1
4141,496969,24,15,14,6,-24.0,-18
4141,497237,24,15,14,4,-9.0,-5
4141,497287,24,15,14,0,-4.0,-4
4141,635643,27,1,7,10,16.0,-6
4141,635645,27,1,7,12,24.0,-12
4149,798509,24,15,14,4,-17.0,-13
4149,127333,24,15,20,100,108.0,-8
4149,127337,24,15,20,95,98.0,-3
4149,128864,24,15,20,76,80.0,-4
4149,910350,24,15,13,7,8.0,-1
I want the output like below in another CSV file
A , C, D,Diff_count,min(H column),max(H column),AVG(H column)
4141,24,25,7,-18,-1,-4.714
4141,27,1,2,-12,-6,-9
4149,24,15,5,-13,-1,-5.8
Can anybody help me to script in korn shell to get the above result!!
Thanks in advance.