CSC 275 - Operating Systems Practicum

Dr. R. M. Siegfried

Assignment #10 - Using sed

Due Friday, November 18, 2022 (Section 1)

Due Wednesday, November 16, 2022 (Section 2)

Before using sed, you will need to create a text file with 40 lines of text. You should have at least 5 occurrences of the word "forest" and at least three occurences of a date where you use a 3-letter abbreviation for the month (e.g., Jan, Feb, Mar, Apr, etc.).

After you have created the file, use sed commands to:

  1. Change a text so that every period at the end of a sentence is changed to an exclamation point (!) and every question mark is replaced with an ellipsis (...).
  2. Change every occurrence of the word forest with woods but only at the end of a line
  3. Change a document so that every occurrence of a three-letter abbreviation for a month is replaced by the appropriate number, i.e., Jan is replace by 1, Feb by 2 etc.

[Back to the Assignment List]