UNIX & GNU/Linux - awk - Read a file and computing the average of students' marks
The awk user command is made to read a file and check each column, one by one. We need to compute the average of students’ marks and to display the total of their average. Let’s go. Explanation In the BEGIN pattern we specify the separator with the FS builtin variable. In our case, it will be the default one: " " (the space character). In the dev pattern, we are going to retrieve marks of each student and make an average of them. ...