Input file contains the scores of few students in certain rounds of a game in the following format.
$ cat file.txt
Calculate the sum and average score of each student (notice that the number of rounds played by each student is not constant, few played 3 rounds, few 4 etc)
The awk script:
$ awk '
- Calculate sum and average of multiple lines - bash
- Sum of numbers in a file - UNIX
- Calculate percentage using awk in bash
- Compute simple average using awk in bash
- Calculate sum of two times of hh-mm-ss format using awk
- Compute sum with awk substr function