Consider the files course1.txt1, course2.txt2 and course3.txt3 (ZIP4). Each of those files contains lines that take the following format:
<family name> <first name> <score> <code>
The code is a letter varying from A to D, and the score is a number composed out of 1 or 2 digits. You may assume that family names and first names consist of a single word that contains only upper and lower case letters. Names are not alphabetically ordered, but each line in course1.txt does have a corresponding line in course2.txt and in course3.txt based on common names (family name and first name).
Give a single command that creates a file containing all scores for all students. All students must be sorted according to the score they got for the second course (in descending order). Students having the same score for the second course should be sorted in alphabetic order, first on their first name and then on their family name. Lines should take the following format:
Score for <first name> <family name>: <score course1> <score course2> <score course3>
You should also assume that it is possible that there are additional course files in your directory.
Use the sed command to perform substitutions as part of a pipeline. As an example, try the following command:
echo mistoke | sed 's/o/a/'