These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX01/Use Vi To Edit A File

Classnotes | UNIX01 | RecentChanges | Preferences

You work for a company called Odyssey INC. You are charged with creating a simple flat-file database for the employees of your company. Eventually, you will create a program that will read this database and give your users information on a particular employee, but for now we will just create the database file.

This flat-file will have the following format:

 USERNAME : FULL NAME : GROUPS : PHONE : OFFICE

Using vi, create a file called "ody_employees.dat" and make the following entries in it.

 hal:Hal Neun Tausend:PR,Sales:868-7722:238
 frank:Frank Poole:PR:773-9847:237
 clarke:Stanley Clarke:PR:432-1234:237a
 fred:Fred Freddington:PR:633-0918:237b
 kubrick:Arthur C. Kubrick:PR:881-0012:237c


After you have made these entries, you discover that the phone number for Frank Poole is incorrect and should be 321-7674. Correct it.


You've just discovered that Fred Freddington has been fired and Arthur C. Kubrick has taken Fred's old office. Delete Fred from the file and make Athur's room number 237b.



Classnotes | UNIX01 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited July 19, 2003 2:18 am (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.