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.

  1. You will need to show the user a menu with a least three options:

1.Enter a contact

2.Show contacts

3.Exit

  1. 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:
    1. friend's full name: first, last.
    2. his/her birth date (dd-mm)
    3. his/her phone number (xxx-yyy-yyyy)
    4. his/her email (name@domain.xyz)
  2. 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)
  3. 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

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!