ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
hi all im dipping toes into the shell scripting world and im already lost. i reading a book its upstairs at moment but im confused i thought shell scripting was all done in shell not in say anjuta for example? i am somewhat familar with C code but this has just lost me. i did create a file it told me to i think it was called "logins" and i only have 3 lines in it not really sure what im doing. i guess my question should be "how do i kno wwhen to put it in terminal or when to put it in program (kdevelop,anjuta).
If you are trying to run commands that would normally be run from the shell then you can easily put them into a bash script to be run over and over again. The first line of a bash script must start with;
Anything after that will mostly be commands you can run from a bash prompt. After creating the file you also have to add the executable flag to the script file.
chmod +x filename
will do this for the user who created the script. Then if you want to run the script at set intervals you can have it run in cron or from a command promt type ./filename if you are in the directory holding the file and that directory is not in your path.
The only thing I'd add to the above, is that the #!/bin/bash is a good idea, but FYI, if you don't put it in, the system will use whatever shell is defined in the user's login entry in /etc/passwd.
On Linux this is usually /bin/bash
Hence, you won't always see it specified explicitly in other's code.