.ND .TL ZA/SX/RE Assessment Exercises 2 .br Editing .LP The following exercise should be completed and handed in at or before the next-but-one terminal session, which will be in week 7, or possibly 8. .sp 2v .LP Write down the \fIem\fP editor commands to perform the following operations. In all cases the operation can be performed by a single \fIem\fP command, but there may be more than one way of doing it. You need not consider precisely what text the file you are editing contains. .IP 1. Find the first line containing the word `pleasant'. .IP 2. Change \fBjust the second occurrence\fP of `pleasant' on this line to `nice'. .IP 3. Change all the other occurences of `pleasant' on this line to `nice'. .IP 4. Print all the lines containing the word `Oyster' or `oyster' but not `Oysters' or `oysters'. .IP 5. Print the \fBlast\fPline containing the word `Walrus'. .IP 6. Print all the blank lines. .IP 7. Print all the non-blank lines. .IP 8. Print all the lines which start with the word `And'. .IP 9. Print all the lines whose first word (sequence of letters) is `And'. .IP 10. Move the last ten lines to the top of the file. .IP 11 Move every line which starts with `And' after the line following it. .IP 12. Print every line containing precisely three words (sequences of letters). .IP 13. Delete \fBall but\fP the first and last lines of the file.