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'd like to learn to write bash scripts.
i downloaded the Bash howto and Bash Guide form the Linux doc Project. I also use documentation given by one of my teacher.
right, i'm really ar the beginning of the bash howto and i'm try a script:
select opt in $OPTIONS; do
if [ "$opt" = "Quit" ]; then
elif [ "$opt" = "Hello" ]; then
echo Hello World
echo bad option
This is a really simple algo that allow user interaction by proposing a prompt so he can type Hello, Quit, or get echoed bad option if he doesn't answer one of these.
The stuff is that whatever i type Quit or Hello, i always got the bad option errot.
Actually, in my ANSI (nedit), all reserved bash words are bolt but not "opt". So it could be that the shell has changed it synthax since this dude wrote that how to....
I actually had problem with my teacher doc that says stuff as : [ $?=1 ] . this was bad synthax, as you have to put a space in around the "=".
So, would u tell me if i'm crazy, if the authors just fuck it up, if the synthax has changed, or simply if i should meet a african maraboo so i could get a "programmer grigri"!
allright, later on the how to i found another way to do it, whatever it doesn't solve the "opt" problem:
echo "type in either Hello or Quit, please"
if [ $WORD = "Quit" ]; then
echo "so by by"
elif [ $WORD = "Hello" ]; then
echo "Hello World"
echo bad option