Starting from:

$29.99

CS 3424 Quiz 5 Solution


(1)
- each line in the input file contains the following fields in this order:
lastname, firstname, section, assignment, grade.

- given a list of grades in the input file grades.txt, create an awk script which prints only the student’s name (first then last), grade, and assignment number for the section number specified on the cmd-line.

- lastly, print the average grade and the number of failing grades (<= 60) for the section number specified on the cmd-line. assume names do not have spaces.

grades.txt:
Adams, John, 2, 1, 30
Addams, Gomez, 3, 3, 80
Allen, Tim, 2, 1, 90
Ball, Lucille, 3, 2, 76
Buscemi, Steve, 3, 1, 80
Busey, Gary, 1, 3, 43
Cage, Nicolas, 2, 5, 110

output for section 1: Gary Busey – 43 – 3
Fails = 1 Average Grade = 43






Script.awk

Outputs

More products