Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve this quastion about lab lenux COMP311 (Linux OS Lab) Final PROJECT Due Date Sunday 09/01/2022 (midnight) Under your home directory, create a directory

image text in transcribedimage text in transcribedimage text in transcribedplease solve this quastion about lab lenux

COMP311 (Linux OS Lab) Final PROJECT Due Date Sunday 09/01/2022 (midnight) Under your home directory, create a directory called finalproject yourstudentidnumber yoursection (example finalproject_1200123_sec1) and underneath it do the following: Write a shell script called mycontacts that when executed displays the following four choices: (Your script should work on your own created contacts file called contacts) 1. Add Contact This option allows the user to create a new contact containing the following items: a) Contact id. a unique number made of exactly four digits. Id numbers that are already in use as well as id numbers that contain anything other than four digits should be continuously rejected until a unique id of the correct format is entered. b) Full name: Full name of the contact to be added (First name and Last name). c) Email Address: This should be automatically added to each contact using the first letter of his/her first name followed by the first letter of his/her last name followed by the first and last digits of their id number. You can assume the domain name to always be birzeit.edu Leg. if first name is Ahmad and last name is Mursi and id number is 1234 then the email address should be am14@ birzeit.edu). The user should be able to add as many contacts as he/she wishes. 2. Delete Contacts This option gives the user two choices: a) Delete a contact A contact entry should be deleted according to a given id number (exact number and not part of it). If the given id number does not exist, a suitable message should be displayed. The user should be able to delete as many contacts as he/she wishes. b) Delete all contacts Selecting this option deletes all the contact entries that have been added to file contacts. 3. Search Contacts This option gives the user one choice: a) Search by id number All user information (Name, id, email address) should be displayed in a suitable and Organized format according to a given id number. If the given id number does not exist, a suitable message should be displayed. The user should be able to search for as many contacts as he/she wishes. 4. Exit Script Allows user to stop running the script and exit with the message "Goodbye" The user should be able to add, delete, or search contacts in any order and as many times as he/she wishes during the same session of executing the mycontacts script. Be sure to use the same names for your shell script(s) and options as given above and to make your shell script(s) as modular as possible way must at least have four different scripts called mycontacts, addcontacts, delcontacts, and searchcontacts respectively). Also, be sure to include any error checking necessary. Go back to your home directory and compress (tar) all your script files inside directory finalproject_id#_sec# in one file as follows: tarswf finalproject_id#_sec#.tar finalproject_id# sec# Turn in your project by replying to the coordinator's message on ritaj and attaching your finalproject_id#_sec# tar file. Helpful Hints 1- The following is what your created contacts file format should look like: 2- Make sure you check your finalproject_id#_sec#.tar file before sending it on ritaj by opening it up inside a new created directory and checking if it opens successfully as follows: After creating your finalproject_id#_sec#.tar file: a- Create a new directory called testing (mkdir testing) b- Copy your finalproject_id#_sec#.tar file inside testing cn finalproject id# sec#.tar testing C- Move inside the testing directory ( cd testing) d- Untar your tar file using the following command: tar -xvf finalproject_id#_sec#.tar if it opens up and all the scripts are there then it is fine to send your original finalproject id# sec#.tar file to ritai, Good luck

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions