How do i start this? (Help)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do i start this? (Help)
# 1  
Old 07-06-2009
How do i start this? (Help)

Write a sh or bash script to manage the customers' information. The script should allow the user to add and remove a customer, display all customers (sorted by LastName, FirstName, PhoneNumber, Company, or Email), and search a customer's information by his/her name. The script should be menu-based with the following options:
Main Menu:
(a) Add a customer
(r) Remove a customer
(s) Search a customer
(d) Display all customers' information
(e) Exit
Your choice?
Add Submenu:
Please input First Name: Feng
Please input Last Name: Gu
Please input Phone Number: 1‐404‐5555555
Please input Company/Organization: Georgia State University
Please input Email: fenggu9083@gmail.com
A new customer has been added.
Remove Submenu:
Please input First Name: Feng
Please input Last Name: Gu
Feng Gu has been deleted from the system.
Search Submenu:
Please input the customer's First or Last name: Feng
First Name: Feng
Last Name: Gu
Phone Number: 1‐404‐5555555
Company/Organization: Georgia State University
Email: fenggu9083@gmail.com
First Name: Feng
Last Name: Xu
Phone Number: 1‐770‐5555555
Company/Organization: Georgia Pacific
Email: fengtan@gmail.com
Display Submenu:
(1) Display all
(2) Display all sorted by Last Name
(3) Display all sorted by First Name
(4) Display all sorted by Phone Number
(5) Display all sorted by Company/Organization
(6) Display all sorted by Email
(7) Return to Main Menu
Your choice?3
All customers sorted by First Name
First Name: Feng
Last Name: Gu
Phone Number: 1‐404‐5555555
Company/Organization: Georgia State University
Email: fenggu9083@gmail.com
First Name: Tom
Last Name: Jackson
Phone Number: 1‐678‐5555555
Company/Organization: Georgia Power
Email: Jackson@gmail.com
Note: For all submenus, please return to the main menu after an action is done. Each customer entry should include FirstName, LastName, PhoneNumber, Company/Organization, and Email. All entries must be stored in a text file customers.txt the following format (“:” is the separator.):
# 2  
Old 07-06-2009
Homework is not permitted at The UNIX and Linux Forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

Thank You.

The UNIX and Linux Forums.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Splitting week start date and end date based on custom period start dates

Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below. Could you please help out to achieve solution through shell script.. File content: ... (2 Replies)
Discussion started by: nani2019
2 Replies

2. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies

3. UNIX for Beginners Questions & Answers

Start /SYS on SUN SPARC does not start machine [SUN SPARC ENTERPRISE T-5240]

-> start /SYS Are you sure you want to start /SYS (y/n)? y Starting /SYS ]-> show HOST /HOST Targets: bootmode diag domain Properties: autorestart = reset autorunonerror = false bootfailrecovery = poweroff ... (29 Replies)
Discussion started by: z_haseeb
29 Replies

4. UNIX for Dummies Questions & Answers

How can I replace the lines that start with a star and replace it with numbers start from 1?

I need to replace the (*) in the fist of a list with numbers using sed for example > this file contain a list * linux * computers * labs * questions to >>>> this file contain a list 1. linux 2. computers 3. labs 4. questions (7 Replies)
Discussion started by: aalbazie
7 Replies

5. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

6. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

7. AIX

Q: how to start a service when system start

As topic, assume we have a service called "blahservice" and we can start it by: startsrc -s blahservice what is the best practice to run such command when system start? - directly use mkitab to add it into /etc/inittab or - drop startup scripts in /etc/rc.d/rcX.d I know they... (4 Replies)
Discussion started by: acerlinux
4 Replies

8. Solaris

Where to start

Hi all, Before I start, I just wanted to mention that I did check in the "I'm new to Unix, what books should I read" sub-forum but didn't find anything that I thought was useful (or maybe I don't know what I'm looking for!). I'm a Windows Admin, have been for quite a few years, all the way... (12 Replies)
Discussion started by: Gaskie
12 Replies

9. Linux

where to put an application if i want to start it on start up

hi i want to know the way by which i put any file somewhere and it get s started when the system restarts or bots i mean whenever my system starts that application must also start thanks (3 Replies)
Discussion started by: shukla_chanchal
3 Replies

10. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies
Login or Register to Ask a Question