Your assignment is to write a shell script invoking awk to count the votes in elections with instant run-offs. For each election named on the command line your script should count the votes and produce a report. The votes cast in an election are contained in a single file which is the name on the command line. The first line of the votes file is the title of the office for which the votes were cast.
All subsequent lines are votes.
This means that the first voter prefers bush, with gore second and sneed third. The second prefers gore and lists 3 alternates. The third prefers bush. In the first round of voting only the first ranked candidates for each voter count. In this example bush would get 2 out of 3 votes which is more than half so bush wins.