Question: In regards to Shell Scripting (Using puTTy) UNIX: Write a shell script phonebook which has the following behavior: ./phonebook.sh new name number adds an entry
In regards to Shell Scripting (Using puTTy) UNIX:
Write a shell script phonebook which has the following behavior:
./phonebook.sh new name number adds an entry to the phonebook. ./phonebook.sh name displays the name and phone number associated with that name. ./phonebook.sh list displays every entry in the phonebook (in no particular order). If the phonebook has no entries, display phonebook is empty ./phonebook.sh clear deletes the entire phonebook.
Hint: So you should have a file called phonebook.txt. It should have entries: Adam 7327231155 Bill 6095554652 . . .
When your script is invoked as: ./phonebook.sh new name number adds an entry to the phonebook ==> you should first make sure the name is not in the book and if not, add the name and number to the book ./phonebook.sh name displays the name and phone number associated with that name. ==> SEARCH in the book and display the number associated with the name ./phonebook.sh list displays every entry in the phonebook (in no particular order). ==> show the contents of the book ./phonebook.sh clear deletes the entire phonebook. ==> delete all entries from the book (a simple and easy command)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
