The lookup script from Lab 57 depends on datafile in order to run. In the lookup script, check to see if the datafile exists and if it is readable and writable. Add a menu to the lookup script to resemble the following:
[1] Add entry
[2] Delete entry
[3] View entry
[4] Exit
You already have the Add entry part of the script written. The Add entry routine should now include code that will check to see if the name is already in the datafile and if it is, tell the user so. If the name is not there, add the new entry.
Now write the code for the Delete entry, View entry, and Exit functions.
The Delete part of the script should first check to see if the entry exists before trying to remove it. If it does, notify the user; otherwise, remove the entry and tell the user you removed it. On exit, make sure that you use a digit to represent the appropriate exit status.
How do you check the exit status from the command line?