Assignment 1
For each of the following questions use vi with the text file of the book Call of the Wild which you can get from Project Gutenberg. When you are done you can check your answers.
- Find the string 'sound'.
- Find the string 'sound' with an upper or lower case S.
- Find the string 'sound' when it is at the beginning of the line.
- Find the string 'sound' with an upper or lower case S when it is at the beginning of the line.
- Find the string 'alive' when it is at the end of the line.
- Find lines that contain 'Buck' and 'Spitz' on the same line in that order.
- Find occurrences of one or two 'z's whether upper or lower case.
- Change the string 'Buck' to 'Fido'.
- Add ', the bad dog, ' after each occurrence of 'Spitz'.
- On lines that contain both 'Buck' and 'Spitz', add ', our hero, ' after 'Buck'.