Question: Using the same database file datebook, record in the spaces provided the sed commands required to complete each problem. Make sure you suppress default printing

Using the same database file datebook, record in the spaces provided the sed commands required to complete each problem. Make sure you suppress default printing for Problems 1, 3, 5, & 6. Problem 10 has the student create a separate sed script file called sed.sh which is run from the command line using the following sed command: $ sed -f sed.sh datebook

SED EXERCISE 1. Change the name Jon to Jonathan.

-------------------------------------------------------------------------------------------------------------------------------- 2. Delete the first three lines.

------------------------------------------------------------------------------------------------------------------------------------ 3. Print lines 5 through 10.

----------------------------------------------------------------------------------------------------------------------------------- 4. Delete lines containing Lane.

---------------------------------------------------------------------------------------------------------------------------------- 5. Print all lines where the birthdays are in November or December (must use mm/dd/yy format).

----------------------------------------------------------------------------------------------------------------------------------------- 6. Append three asterisks to the end of lines starting with Fred.

------------------------------------------------------------------------------------------------------------------------------------------- 7. Replace the line containing Jose with JOSE HAS RETIRED.

---------------------------------------------------------------------------------------------------------------------------------------------- 8. Change Popeye's birthday to 11/14/46. Assume you don't know Popeye's original birthday. Use a regular expression to search for the birthday (i.e., you must match a generic mm/dd/yy search pattern).

----------------------------------------------------------------------------------------------------------------------------------------------------- 9. Delete all blank lines (blank lines can be null lines, contain spaces, or tabs).

-------------------------------------------------------------------------------------------------------------------------------- 10. Write a sed script (in a separate file called sed.sh) that will: a. Insert above the first line the title PERSONNEL FILE. b. Remove the salaries ending in 500. c. Print the contents of the file with the last names

d. . Append at the end of the file THE END.

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!