awk average part of column if lines (specific field) match

后端 未结 3 1068
终归单人心
终归单人心 2021-01-27 13:04

Here is a sample of my input file :

$cat NDVI-bm  
P01 031.RAW 0.516 0 0  
P01 021.RAW 0.449 0 0  
P02 045.RAW 0.418 0 0  
P03 062.RAW 0.570 0 0  
P03 064.RAW 0.         


        
3条回答
  •  盖世英雄少女心
    2021-01-27 13:31

    Have a different array where you keep track of the number of entries you have seen for each index, and do the division in the END block.

提交回复
热议问题