Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 01 (5 points) Write an piped command using cat, grep, and cut to read the provided data file, named lab0201.csv, and print the Name

Task 01 (5 points)

Write an piped command using cat, grep, and cut to read the provided data file, named lab0201.csv, and print the Name field from each line where the section is online

Input file (lab0201.csv)

Expected output of script

Name,Final Grade,Section

Andrew,95,online

Brandon,100,online

Chelsey,100,onsite

Deborah,72,online

Eric,65,online

Frank,88,onsite

Shaun,91,onsite

Ninette,82,online

Nguyen,80,onsite

Andrew

Brandon

Deborah

Eric

Ninette

Task 02 (5 points)

Write a piped command using tail, cut, sort, uniq, and wc to read the provided data file, named lab0202.csv, and print the number of unique ip addresses.

Input file (lab0202.csv)

Expected output of script

date time protocol ip-address port packet-size

2018-01-01 19:27:19 TCP 11.101.6.64 22 44

2018-04-17 01:35:12 UDP 10.101.7.69 2135 83

2018-05-05 04:26:05 UDP 11.101.6.65 2160 104

2018-08-20 15:43:16 TCP 10.101.7.64 22 113

2018-02-10 02:28:02 UDP 11.101.6.65 2089 68

2018-03-22 00:05:32 TCP 9.101.7.65 23 92

2018-04-24 19:32:47 TCP 9.100.8.65 22 93

2018-05-19 01:22:06 TCP 10.100.7.64 2107 29

2018-04-13 03:51:33 TCP 9.102.8.64 22 32

2018-08-16 21:02:36 UDP 11.100.8.65 2190 17

2018-06-27 00:44:54 UDP 11.101.6.65 2109 73

2018-01-08 07:39:00 TCP 10.101.8.65 22 74

2018-01-22 07:08:54 UDP 9.101.7.65 2165 27

2018-01-11 07:17:44 TCP 11.101.6.65 22 110

2018-01-10 13:14:41 TCP 10.101.7.64 22 89

2018-08-23 13:47:24 UDP 11.100.6.65 2187 93

2018-08-17 06:29:35 TCP 11.101.6.65 2114 66

2018-11-23 02:22:22 UDP 9.100.7.64 2142 118

2018-09-22 22:06:47 TCP 11.101.6.65 22 9

2018-04-04 09:41:43 UDP 9.102.7.64 2116 34

13

Task 03 (10 points)

Write a piped command using head, tail, sort, cut, and sed to return the date of the latest event in the file in yyyy/mm/dd format

Input file (lab0202.csv)

Expected output of script

date time protocol ip-address port packet-size

2018-01-01 19:27:19 TCP 11.101.6.64 22 44

2018-04-17 01:35:12 UDP 10.101.7.69 2135 83

2018-05-05 04:26:05 UDP 11.101.6.65 2160 104

2018-08-20 15:43:16 TCP 10.101.7.64 22 113

2018-02-10 02:28:02 UDP 11.101.6.65 2089 68

2018-03-22 00:05:32 TCP 9.101.7.65 23 92

2018-04-24 19:32:47 TCP 9.100.8.65 22 93

2018-05-19 01:22:06 TCP 10.100.7.64 2107 29

2018-04-13 03:51:33 TCP 9.102.8.64 22 32

2018-08-16 21:02:36 UDP 11.100.8.65 2190 17

2018-06-27 00:44:54 UDP 11.101.6.65 2109 73

2018-01-08 07:39:00 TCP 10.101.8.65 22 74

2018-01-22 07:08:54 UDP 9.101.7.65 2165 27

2018-01-11 07:17:44 TCP 11.101.6.65 22 110

2018-01-10 13:14:41 TCP 10.101.7.64 22 89

2018-08-23 13:47:24 UDP 11.100.6.65 2187 93

2018-08-17 06:29:35 TCP 11.101.6.65 2114 66

2018-11-23 02:22:22 UDP 9.100.7.64 2142 118

2018-09-22 22:06:47 TCP 11.101.6.65 22 9

2018-04-04 09:41:43 UDP 9.102.7.64 2116 34

2018/11/23

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Understand how to design effective service guarantees.

Answered: 1 week ago