choice script

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

choice script

Postby ofbodur » May 1st, '13, 00:19

In shell script,

Let's say that I want to ask user to choose one option from 5-6 options and give the user all the options with NUMBERS .. 1- love, 2-scenery, 3-school, etc. Then I want the user to enter the number of his/her choice. Then, according to the user's choice, I will print some comments on the screen. That's all!

Would you please give some references to let my script shine or make it practical and easy/ with least amount of codes?

Thanks in advance
There is nothing worse than having failed to explain what you believe.
User avatar
ofbodur
 
Posts: 35
Joined: Mar 10th, '13, 12:33
Location: Istanbul

Re: choice script

Postby VoodooDali » May 1st, '13, 00:22

Your posts sound like you're trying to get us to do your homework for you. ;)
Image
Voo #557749
running "Celene"
ASUS G73Jh
Intel Core i7 720QM
AMD (ATi) Mobility Radeon HD 5870
Mageia 4
User avatar
VoodooDali
 
Posts: 114
Joined: Mar 24th, '13, 18:11
Location: Chicago, IL, US

Re: choice script

Postby ofbodur » May 1st, '13, 00:26

VoodooDali wrote:Your posts sound like you're trying to get us to do your homework for you. ;)


I am not trying to get any of you do my homework... I am not that type of person.

Indeed, I am just a Mageia 2 user and want to get some help... I am a newcomer . That is all normal isn't it?
There is nothing worse than having failed to explain what you believe.
User avatar
ofbodur
 
Posts: 35
Joined: Mar 10th, '13, 12:33
Location: Istanbul

Re: choice script

Postby doktor5000 » May 1st, '13, 10:18

Check the answer in the other thread about $1. In this case simple searching would have gotten you http://tldp.org/HOWTO/Bash-Prog-Intro-H ... html#ss9.1 for example.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18064
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest