LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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


Closed Thread
  Search this Thread
Old 12-04-2009, 01:33 AM   #1
larry5757
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Creating a script that adds or subtracts.


Hello,

I need to create a script that takes two numbers as input from the user, and then asks the user if they would like to add or subtract the two numbers (using a case statement). Then print out the result in a friendly message. I also have to make sure to let the user know if they choose an option that was not on the menu. Any help would be appreciated!
 
Old 12-04-2009, 01:39 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
It would help if you gave us more information, i.e. what you've done so far, the language you're working in and what you're having problems with. This doesn't seem like a complicated task..
 
0 members found this post helpful.
Old 12-04-2009, 01:43 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
What did you learn in class? What resources are you using to help learn shell scripting? What have you tried so far?
 
0 members found this post helpful.
Old 12-04-2009, 06:36 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.

What is particularly rude here is that you did not respond to the 2 replies---both posted within 10 minutes of your original question.

Please feel free to start a new thread that meets these guidelines.
 
  


Closed Thread


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
Help with script that adds date then copy's Quickdraw Programming 3 01-03-2008 03:25 PM
Need help in with creating a script. xtremeclones Linux - Software 10 10-01-2007 05:34 AM
Creating a script thomas289 Linux - Networking 1 12-17-2004 11:59 AM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
Creating a Script? BajaNick Linux - Software 1 07-26-2003 07:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 AM.

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