Suppose we have a log file like marks.log and the content looks something like this:
Fname Lname Net Algo
Jack Miller 15 20
John Compton 12 20
Susan Wilson 13 19
I want to add a new column that contains average for each person, and a new row that contains average for each course. The result has to look like this:
Fname Lname Net Algo Avg
Jack Miller 15 20 17.5
John Compton 12 20 16
Susan Wilson 13 19 16
Average 13.3 19.6 -