LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2004, 10:16 PM   #1
Alekscat
LQ Newbie
 
Registered: May 2004
Location: Richmond, VA
Distribution: Knoppix
Posts: 7

Rep: Reputation: 0
Question Totally Lost! Need Immediate Help!


Here is my project!
It is due this Thursday:

I can figure out that I need to echo out the
first part & do a clear command up top, but
I can't figure out how to incorporate all the
material and make it show.
I was thinking an if, then statement,
but how do I add the name information to make it
come up?
Also, how do I make it do a continuous input?
I'm very lost here & have just until Thursday evening
at 7 to complete this! I have found noone locally
who can help me. I am desperate!
THANK YOU!!! Alekscat
reply to flashkittyfever@yahoo.com and/or this forum.

HERE IS MY PROJECT:

Bash Script for:

Step 1 The following menu is displayed on a clear
terminal screen when executed. Also, you must
accept either upper or lower case input from a user.

Contact List
- - - - - - - - - - -
Choose one of the following persons:

[E]vans, Roland
[J]ones, Mildred
[S]mith, Julie
[Z]ane, Morris

Step 2 -

If "E" is selected display:

Roland Evans
4321 Floppy Dr.
Hardscrabble, CO 80753
(303) 734-9874
(303) 734-9892 (fax)
revenas@zzy.net
Business partner & old friend

If "J" is selected display

Mildred Jones
249 E. 7th St., Apt. 19
New York, NY 10019
(212) 533-2814
(212) 533-9972 fax
milliej@loisaida.com
friend
Birthday: Feb. 11

If "S' is selected display

Julie Smith
123 Someplace Rd.
Richmond, VA 23219
(804) 631-2814
(804) 732-9972 fax
jsmith@richmond,com
Business Associate

If "Z" is selected display
Morris Zane
241 Roundabout Dr
Richmond, VA 23220
(804) 231-6614
(804) 321-4452 fax
mzane@rsroute.com
Business Associate

Step 3- Write the script so it accepts
continuous input, instead of terminating
after displaying just one address.


Last edited by Alekscat; 05-04-2004 at 10:20 PM.
 
Old 05-04-2004, 10:59 PM   #2
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
this might be silly, but if this is a school/uni assignment ... shouldn't you work this out yourself?

And it certainly doesn't look like something you are doing for work.
 
Old 05-04-2004, 11:09 PM   #3
Alekscat
LQ Newbie
 
Registered: May 2004
Location: Richmond, VA
Distribution: Knoppix
Posts: 7

Original Poster
Rep: Reputation: 0
Believe me, I have tried. If I hadn't been trying and been totally stumped, I wouldn't have asked. I went into the class cold w/ no DOS, UNIX, LINUX, etc. & the only code I know is some HTML.
I just have no idea how to get the areas I mentioned started and I've been trying for a few weeks. I'll admit being dumb about it. Everyone else in the class has worked with others, but work and transportation situation prohibited me from hanging around & getting help. My book is really no help, as it has no example even vaguely like this, so I don't know what direction to take.
 
Old 05-05-2004, 01:14 PM   #4
bardinjw
Member
 
Registered: Apr 2003
Location: boston
Distribution: ubuntu debian redhat fedora
Posts: 108

Rep: Reputation: 15
i'll give you a hint:

case
esac

look for scripting tutorial online.
almost any tutorial will give you what you need
 
Old 05-05-2004, 01:53 PM   #5
Alekscat
LQ Newbie
 
Registered: May 2004
Location: Richmond, VA
Distribution: Knoppix
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks! I was thinking echos & case or if/else, but perhaps case would be simpler.
 
Old 05-05-2004, 02:09 PM   #6
sphynx
Member
 
Registered: Feb 2002
Location: /usr/home
Distribution: Ubuntu / Gentoo / Whatever
Posts: 67

Rep: Reputation: 15
well i can't write the script for you, i have my own due. but if you want to run the script continuously you could put the whole thing in a while loop. inside you can echo out your menu, and then do a read to get the user input. it's a rather trivial script you have here. and just to help, for things like this, you should probably post in the Programming section of the forums, its likely to get the right kind of attention there. if you search online you may also find a linux user group in your area.
 
Old 05-10-2004, 03:25 AM   #7
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
oh case is the way to go ...

And yes, scripting tutorials are great ... i can't ever find what i need in them though :P

Linux in a Nutshell from O'Reilly has a good Scripting section ... might be in the librarium.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Totally lost..Please Help..Can't Install amy1234 Linux - Hardware 1 07-27-2005 09:11 PM
Totally lost..Please Help..Can't Install amy1234 Linux - Hardware 2 07-27-2005 08:58 PM
Cant get nic going, totally lost and desperate... castrox Slackware 19 03-06-2004 04:18 AM
TOTALLY Lost mouse ihr bist weasel Mandriva 1 01-12-2004 09:39 PM
Totally lost... Zander Linux - Newbie 13 07-28-2002 06:25 PM


All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration