December 1999
Beginner
528 pages
11h 10m
English
To delete records from a file you must first present the record to the user to make sure that this is the correct record to delete. When this is confirmed you can then proceed to delete the record from the file.
To delete a record we need to be able to do the following tasks:
1. |
Search for the record.
|
2. |
Display the record.
|
3. |
Confirm deletion.
|
4. |
Update the file.
|
To search for a record we will use the field surname. Once we have got a surname from the user on which to search we can then proceed. We could use grep or awk, but because our file will have no more than perhaps 100 records we shall read the file in and test for a match.
If your file is going to contain over a couple of hundred records, I advise you to ...
Read now
Unlock full access