UNIX: Exercise Sheet 6
-
Copy the file mole.txt into your home
directory (press shift and the left mouse button to download the file using Netscape).
-
Edit your copy of the document using vi.
-
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.
-
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.
-
Add the words "About time!" to the end of the second
paragraph.
-
Delete the sentence "Time flies like an arrow
but fruit flies like a banana" and re-form the paragraph.
-
Replace all occurrences of "is" with "was".
-
Swap the two paragraphs.
-
Save the file and quit.
-
Repeat the exercise with emacs. Which did you find
easier?
-
Can you write a simple C program (say the hello world
program) and makefile, compile and run it - all from inside emacs?
-
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.
(Contents)