GREP Homework
Create a file with the raven poem. You can find the poem here.
Copy this page into word and fill in the grep commands you would use to do the following:
1. Use grep and wc to determine how many times Edgar Allen Poe's poem "The Raven" contains the word "raven". (All following questions refer to this same poem.)
_________________________________________________
2. Use grep or egrep to pick out the blank lines in the file:
__________________________________________________
3. Use grep or egrep to pick out lines with at least 40 characters:
__________________________________________________
4. Use grep or egrep to pick out lines with no punctuation
__________________________________________________
5. Use grep or egrep to pick out lines with an uppercase letter other than the first character. (The first character on the line does not count.)
__________________________________________________
6. Use grep or egrep to pick out lines with rep, word, or more.
__________________________________________________
7. Use grep or egrep to pick out lines without rep, word, or more.
__________________________________________________
8. A line that uses first letter alliteration - starting two words with the same letter. (There are many)
__________________________________________________
9. Use grep or egrep to pick out lines that have at least two p's followed by any number of letters followed by 'ore'. The p's do not have to be next to each other.
__________________________________________________
10. Use grep or egrep to pick out lines with 2 sets of double letters
__________________________________________________