Introduction to UNIX: 
Exercise Sheet Six

  1. Copy the file mole.txt into your home directory (press shift and the left mouse button to download the file using Netscape).
  2. Edit your copy of the document using vi.
  3. Go to the end of the document and type in the following paragraph:

    Joined the library. Got Care of the Skin, Origin of the Species, and a book by a woman my mother is always going on about. It is called Pride and Prejudice, by a woman called Jane Austen. I could tell the librarian was impressed. Perhaps she is an intellectual like me. She didn't look at my spot, so perhaps it is getting smaller.
  4. Correct  the three  spelling errors in the first three lines of the first paragraph (one  error per  line) and  remove the extra "Geography" in the 3rd line of the first paragraph.
  5. Add the words "About time!" to the end of the second paragraph.
  6. Delete  the sentence  "Time flies like an arrow but  fruit flies like a banana" and re-form the paragraph.
  7. Replace all occurrences of "is" with "was".
  8. Swap the two paragraphs.
  9. Save the file and quit.
  10. Repeat the exercise with emacs. Which did you find easier?
  11. Can you write a simple C program (say the hello world program) and makefile, compile and run it - all from inside emacs?
  12. If you'd like an indepth vi tutorial try running "vimtutor". For an indepth emacs tutorial, type M-x help-with-tutorial from inside emacs.

(BACK TO COURSE CONTENTS)


© September 2001 William Knottenbelt (wjk@doc.ic.ac.uk)