Vi For Smarties
Quiz One
- Your friend comes to you with an odd request. All she wants you to
do is make a simple text file containing the word hello.
She asks that you name the file hello.txt.
How would you do this using Vi? (Remember to save and quit.)
ANSWER
- Bad move. Now your friend knows you can use Vi, and she wants you
to make a longer text file named dummy.txt which
contains the sentence "Vi is for dummies." once per line
for 23 lines. What is the most efficient way to do this with Vi?
ANSWER
- Your annoying friend is back. She has seen how efficient Vi is, and
now wants you to replace all occurrences of the word
dummies with the word Smarties in the
file dummy.txt. What is the quickest way to do this in
Vi?
ANSWER
- She's sulking because her own editor seems useless now.
Unfortunately, you've wasted so much time showing off that you've
forgotten you have a report to finish. You've also forgotten to wear
your watch today, and you need to make this very important deadline.
Quickly, how do you access the system's correct time via the Unix
date command without leaving Vi?
ANSWER
Until you have mastered everything on this page, you are
not ready for Lesson Five.
Copyright © 2001
jerry_y_wang@yahoo.com.
All rights reserved.