Write an AWK script called avgsalary.awk. The script will be a given a file where each row is a name followed by the individual’s salary, followed by the family’s salary, all separated by spaces. Your script should print the average individual salary, as well as the average family salary, for all the rows in the file. for example sample input file: NedFlanders 60000 150000 SuperNintendoChalmers 80000 80000 Homer 0 100000 should print Average Individual Salary: 46666 Average Family Salary: 110000 Show transcribed image text Write an AWK script called avgsalary.awk. The script will be a given a file where each row is a name followed by the individual’s salary, followed by the family’s salary, all separated by spaces. Your script should print the average individual salary, as well as the average family salary, for all the rows in the file. for example sample input file: NedFlanders 60000 150000 SuperNintendoChalmers 80000 80000 Homer 0 100000 should print Average Individual Salary: 46666 Average Family Salary: 110000
Expert Answer
Answer to Write an AWK script called avgsalary.awk. The script will be a given a file where each row is a name followed by the ind…