Question: Hello, using awk command in linux for the first time and I'd like you to help me solve some problems and explain to me why

Hello, using awk command in linux for the first time and I'd like you to help me solve some problems and explain to me why you took the steps please. I tried doing them on my own, but somehow I keep getting them wrong. You should use the BEGIN & END script; here are the questions:

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

Input file (hw01.csv):

Name,Final Grade,Section

Taylor,90,onsite

Brett,98,online

Katy,78,onsite

Rebecca,69,online

Erin,55,online

Ashley,89,onsite

Shelby,92,onsite

Reece,85,online

Brian,82,onsite

Expected output:

Taylor is an onsite student

Brett is an online student

Katy is an onsite student

Rebecca is an online student

Erin is an online student

Ashley is an onsite student

Shelby is an onsite student

Reece is an online student

Brian is an onsite student

2) Using the same input file, write an awk script that will output the names of the students with a score that is higher than 75.

Expected output:

Taylor

Brett

Katy

Ashley

Shelby

Reece

Brian

#3 Using the same file, write an awk script to read the provided data file and print the Name field from each line where the section is online.

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

Input file (hw02.csv)

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

Example output:

92

10

133

22

107

13

Thank you so much!

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!