Question: Write a piped command using grep, sort, uniq, tail, wc, and cut to read the provided data file and return the number of unique IP

Write a piped command using grep, sort, uniq, tail, wc, and cut to read the provided data file and return the number of unique IP addresses that match the following criteria:

  • IP address begins with 11

  • Occurred before August 2018

  • Occurred at an even numbered hour

  • Has a size less than or equal to 100

Input file (lab0202.csv)

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

Write a single regular expression using grep to read the provided data file and return only the valid email addresses.

Input file (lab0207.txt)

Expected output of script

Eat@Joes@asu.edu

bmbaklavah.com

bmgatto@asu.edu

jjsibelius@asu

<>?!@##$%(*&^@example.com

B. M. Gatto@example.com

snehdar@asu.edu

ThisEmailIsWayTooLongToBeValid@asu.edu

lbeethoven@.com

v.v.doom1234@asu.edu

bmgatto@asu.completelymadeupextension

@.

ahitch@@@@@example.com

hfbohannon@asu.

@asu.edu

bmgatto@asu.edu

snehdar@asu.edu

v.v.doom1234@asu.edu

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!