CSC 275 - Operating Systems Practicum

Dr. R. M. Siegfried

Assignment #9 - Using grep

Due Friday, November 11, 2022 (Section 1)

Due Monday, November 30, 2022 (Section 2)

In this assignment, you will create write the regular expression that specifies the words describes below:

  1. Use grep and wc to determine how many times Edgar Allen Poe's poem "The Raven" contains the word "raven". You can find the poem here.
  2. Use grep or egrep to pick out the lines in a text file which satisfy:
    1. Blank lines
    2. Lines with at least 3 characters
    3. Exactly 3 letters from abc
    4. Of the format non-a followed by 3 to 5 a's followed by a non-a
    5. Lines without the punctuation
    6. Lines with an upper case letter
    7. Lines with abc or cba or bdc

[Back to the Assignment List]