Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I need to make a game for my linux class and im so lost on how to do this.
I have to make a game and here is what i was told to do:
Do you want to do even or odd numbers? Enter 1 for odd or 2 for even.
Ask the user which number will come next?
Show the option they entered and then the correct number.
Tell the child if they got it correct. (display the “correct” in green if the child got it right and “wrong” with the correct answer in red if they got it wrong)
Keep asking until you get to 20.
If someone can help me with this i would greatly appreciate it
there are literally thousands of examples on how to write this type of script available online. You favourite search engine will help you find them. If you have trouble, post what you have done, explain the problem and we will try to guide you in the right direction. We will not however do your homework for you.
Distribution: Red Hat Enterprise Linux, Mac OS X, Ubuntu, Fedora, FreeBSD
Originally Posted by nbritton
If you don't take the time to actually learn this you will be cheating yourself out of an education.
Note that the script I wrote is posix compliant, this was intentional, it was tested and will run in bash, sh, ksh, and zsh. The "echo -e", "\e and \x1b", "==", "[[ ]]", and "backticks: ` " are not posix compliant, this is why I didn't use them. Also, the function syntax that I picked is universally compatible with *sh shells. Error handling is also a necessary component of proper programming. Also note that my excessive use of semicolons are for educational purposes, they are superfluous; my personal preference is to punctuation my statements for the sake of clarity, it's also a habit I picked up from programming with perl.