Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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_sec I) and underneath

image text in transcribed
image text in transcribed
image text in transcribed
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_sec I) 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 cach 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 (e.g. 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: 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 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: 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 (you 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: tar-cvf 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. No projects will be accepted after the due date and time (Sunday 09/01/2022 midnight). No exceptions. Helpful Hints 1- The following is what your created contacts file format should look like: 1234:Ahmad Hamdan:ah14@ birzeit.edu 5555:Samah Khalil:sk55@birzeit.edu 2231:Subha Ali:sa21@birzeit.edu 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 final project_id#_sec#.tar file inside testing cp finalproject_id#_sec#.tar testing - Move inside the testing directory (ed 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 ritaj. 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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

Compare the different types of employee separation actions.

Answered: 1 week ago

Question

Assess alternative dispute resolution methods.

Answered: 1 week ago

Question

Distinguish between intrinsic and extrinsic rewards.

Answered: 1 week ago