Question: Write a bash shell script that does the following : Phone (phone): Write a shell script (called phone) that creates a simple telephone list (create

Write a bash shell script that does the following :

Write a bash shell script that does the following : Phone (phone):

Phone (phone): Write a shell script (called phone) that creates a simple telephone list (create an empty file called phonelist in your home directory: /home/user-name/phonelist). Each line in this file consists of two fields: a name and a phone number. The script shall do the following: 1. When the user types the command: phone -a name number, this will add a new record (name, number) to the list. If the name or the number or both are missing, nothing happens. 2. When the user types the command: phone -g name then the script should search in the file "/home/user-name/phonelist and get and display all (name, number) entries matching the specified name. 3. When the user types the command: phone -c number1 number2" then the script should change the existing match of numberl in the file "/home/user-name/phonelist to number2. When the user types the command: phone -d name number then the script should delete from the file /home/user-name/phonelist all existing records that match (name, number). 5. When the user types the command: phone -d name then the script should delete from the file"/home/user-name/phonelist all existing records that have a matching name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!