Question: Task 01 (5 points) Write an awk script that will accept the following file and output the name and grade fields Input file (hw0401.csv) Example

Task 01 (5 points)

Write an awk script that will accept the following file and output the name and grade fields

Input file (hw0401.csv)

Example output

Name,Final Grade,Section

Andrew,95,online

Brandon,100,online

Chelsey,100,onsite

Deborah,72,online

Erik,65,online

Arielle,88,onsite

Shaun,91,onsite

Ninette,82,online

Nguyen,80,onsite

Name Final Grade

Andrew 95

Brandon 100

Chelsey 100

Deborah 72

Erik 65

Arielle 88

Shaun 91

Ninette 82

Nguyen 80

Task 02 (5 points)

Write an awk script that will output the given data in the following format:

Input file (hw0401.csv)

Example output

Name,Final Grade,Section

Andrew,95,online

Brandon,100,online

Chelsey,100,onsite

Deborah,72,online

Erik,65,online

Arielle,88,onsite

Shaun,91,onsite

Ninette,82,online

Nguyen,80,onsite

Andrew is an online student

Brandon is an online student

Chelsey is an onsite student

Deborah is an online student

Erik is an online student

Arielle is an onsite student

Shaun is an onsite student

Ninette is an online student

Nguyen is an onsite student

Task 03 (5 points)

Write an awk script that will output the names of the students with a score that is higher than 75.

Input file (hw0401.csv)

Example output

Name,Final Grade,Section

Andrew,95,online

Brandon,100,online

Chelsey,100,onsite

Deborah,72,online

Erik,65,online

Arielle,88,onsite

Shaun,91,onsite

Ninette,82,online

Nguyen,80,onsite

Andrew

Brandon

Chelsey

Arielle

Shaun

Ninette

Nguyen

Task 04 (5 points)

Write an awk script to read the provided data file and print the Name field from each line where the section is online.

Input file (lab0401.csv)

Expected output of script

Name,Final Grade,Section

Andrew,95,online

Brandon,100,online

Chelsey,100,onsite

Deborah,72,online

Erik,65,online

Arielle,88,onsite

Shaun,91,onsite

Ninette,82,online

Nguyen,80,onsite

Andrew

Brandon

Deborah

Erik

Ninette

Task 05 (5 points)

Write an awk script that will take the following data file and return the sum of each record.

Input file (hw0405.csv)

Example output

1,3,5,8,10,11,54

1,2,3,4

15,18,21,42,37

1,1,1,0,0,3,16

4,1,8,0,4,6,13,16,17,20,8,6,4

13

92

10

133

22

107

13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!