In this exercise, you will write a phone script which uses the concepts we have learned in this course. You may use this script to create contact information and lookup phone numbers or remove phone numbers as shown below. The script you are going to write will invoke other scripts based on vour selections in a menu. Let's call the top script as phone.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

May I get help with this in bash shell.

In this exercise, you will write a phone script which uses the
concepts we have learned in this course.
You may use this script to create contact information and lookup
phone numbers or remove phone numbers as shown below.
The script you are going to write will invoke other scripts based
on your selections in a menu. Let's call the top script as phone.
The phone script may have either zero, one or two parameters.
If there is no parameter when you run phone script (i.e. if you
just run $ ./phone):
It should have a menu as follows:
1- Enter Information
2- Search by Last Name
3- Search by First Name
4- Search by part of last name
5- Display all phone numbers
6- Get the email
7- Exit
Please enter the choice:
When the use enters a choice, then another script needs to
be executed.
For example, when the user enters the first choice above
which is: 1- enter Information, a script must run that shows
the following lines:
1- First Name:
2- Last Name:
3- Email:
4- Cell Phone:
5- Home phone
6- Do you want to continue? Y/N :
If the user enters Y, then the code should get the
information of the next person.
If you run the script with one parameter, then the code should
check other information related to that parameter and display
them. For example, if the parameter is the last name, the script
should display the phones and email of that person. In other
words, if you run ($ ./phone Smith), the script rather than
showing the above menu, it should display the phones and email
of Mr. Smith that you have in your contact list.
If there are two parameters, the first parameter would be an
option. For example, d means delete and s means search. In
other words, if you run
($ ./phone d Smith), the script must delete or remove Mr. Smith
from the contact list.
Additional work: You can add some awk or sed command that
enhance the phone script. Try to find out how these commands
can be applied to this application.
Transcribed Image Text:In this exercise, you will write a phone script which uses the concepts we have learned in this course. You may use this script to create contact information and lookup phone numbers or remove phone numbers as shown below. The script you are going to write will invoke other scripts based on your selections in a menu. Let's call the top script as phone. The phone script may have either zero, one or two parameters. If there is no parameter when you run phone script (i.e. if you just run $ ./phone): It should have a menu as follows: 1- Enter Information 2- Search by Last Name 3- Search by First Name 4- Search by part of last name 5- Display all phone numbers 6- Get the email 7- Exit Please enter the choice: When the use enters a choice, then another script needs to be executed. For example, when the user enters the first choice above which is: 1- enter Information, a script must run that shows the following lines: 1- First Name: 2- Last Name: 3- Email: 4- Cell Phone: 5- Home phone 6- Do you want to continue? Y/N : If the user enters Y, then the code should get the information of the next person. If you run the script with one parameter, then the code should check other information related to that parameter and display them. For example, if the parameter is the last name, the script should display the phones and email of that person. In other words, if you run ($ ./phone Smith), the script rather than showing the above menu, it should display the phones and email of Mr. Smith that you have in your contact list. If there are two parameters, the first parameter would be an option. For example, d means delete and s means search. In other words, if you run ($ ./phone d Smith), the script must delete or remove Mr. Smith from the contact list. Additional work: You can add some awk or sed command that enhance the phone script. Try to find out how these commands can be applied to this application.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Fibonacci algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education