Question: UNIX Shell Programming You need to create a file with your personal contacts in order to keep track of their phone number, email and birthdays.
UNIX Shell Programming
You need to create a file with your personal contacts in order to keep track of their phone number, email and birthdays.
You are required to write a script titled createcontacts.sh that will create a text file called mycontacts.txt in the current directory, where each entry (line) consists of fields separated by spaces.
- You will need to show the user a menu with a least three options:
1.Enter a contact
2.Show contacts
3.Exit
- When the user selects Enter a contact, the program should prompt for the contacts information. Ask the user for the data for each field as follows:
- friend's full name: first, last.
- his/her birth date (dd-mm)
- his/her phone number (xxx-yyy-yyyy)
- his/her email (name@domain.xyz)
- Save the record to the file, appending the complete record in one line to your contacts file (hint: use append when redirecting the line to the file)
- Make the script file executable and execute it to test each one of the input options to be sure that is working
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
