Average marks from list

后端 未结 3 1790
北海茫月
北海茫月 2020-12-11 12:13

Sorry if I don\'t write good, it\'s my first post.

I have a list in one file with the name, id, marks etc of students (see below):

And I want to calculate th

3条回答
  •  被撕碎了的回忆
    2020-12-11 12:42

    Something like (untested)

    awk '{ n = split($6, a, ","); total=0; for (v in a) total += a[v]; print total / n }' main_list
    

提交回复
热议问题