Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students explore these related Databases questions

Question

Types of physical Maps?

Answered: 3 weeks ago

Question

Provide examples of Dimensional Tables.

Answered: 3 weeks ago