Question: d. Let's find all lines that contain a commission rate of.15. Enter the command egrep .15' sales.txt at 03 What entries appeared that shouldn't? thisyp
d. Let's find all lines that contain a commission rate of.15. Enter the command egrep .15' sales.txt at 03 What entries appeared that shouldn't? thisyp regex? How will you Do so and try again to make sure you have the correct answer. Let's assume we want to find all records whose Sales value is over 9999. Type the commujhd egrep '[1-91 t0-91(4)' sales.txt 2s-Why did we use [1-91 instead of just having 10-9145? 10000 for Sales. The command you might think of would be . Following up on part e, assume we instead want to find everyone who had less than egrep '[1-9110-91 (3)' sales.txt Enter this command. You will see that it responded with all entries. Why didn't it work? See if you can figure out. One solution to solve this problem is to repeat the command from part e but add the-voption to your egrep command. Try it out to see if it worked. & To find all entries of sales in either OH or PA, you can use egrep OHIPA sales.txt. Try it. Write an egrep command to find all entries that contain either Barber Q6- What command did you enter? Following up on part g, how could you search for entries that contain both OH and PA? Hint: you cannot do this with a single egrep statement, instead use a pipe between two or Cameron. statements 07- What command did you create? Find all entries that contain at least 4 states. Notice that separating states is a comma and that 8- What command did you come vwith i commas are to separate states. For this step, write egrep commands using the computers.txt file. Each step requires that you come up with the egrep command. The answer to place in your answer file is the egrep command you come up with which successfully accomplishes the step (except for 3f which requires an explanation). a. 09-Find all entries of faculty whose name starts with the letter F, G, H, I, J or K 3. Provide the command you used. b. Find all entries of faculty whose name ends with an r. c. 010-Find all entries that are on the h floor of their building. Provide the command This means that the room number is 4xx (so for instance, it should not include 314 just because there is a 4). d. Find anyone whose office is only 2 digits, This one is tricky in that you have to figure e. Assume that you want to find all faculty who have a PC in their office. While the out how to specify that it should not include 3-digit numbers. command egrep 'PC" computers.txt will work in this case, explain why it may not work in general. That is, can you figure out why egrep PC computers.txt may give you wrong answers if we had other entries in the computers.txt file? 4 For this step, we will use the addresses.txt file. As with part 3, your answers to each step
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
