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.
The usual distinction between a scripting language and a programming language is that a scripting language does not require an explicit compilation step.
Examples in Linux would be a script written for the bash shell, that can be run directly, as compared to the Linux kernel, which is written in C, and needs to be compiled into a machine code binary.
Scripting languages are generally easier to write and test, but run more slowly as they need to be interpreted when run. A compiled binary from a programming language will run much more quickly.
This distinction gets blurred. Consider awk, which is written as a script, but is compiled to machine code before it is actually run. This explains why an awk script completes more quickly than a bash script written to perform the same task.
Distribution: BSD & Linux - As long as they are Lightweight
Writing & running a script can be very quick, whilst writing a compiled language program usually takes a lot longer & has to be compiled before being run.
(For simple jobs & one offs you would most likely write a script to do it.)
Scripting can be used to model a job to be ran then moved to a high level language once the script is proven to perform the job/task and the job can be faster with a high level language using the script as a model. Sometimes scripts will fulfill the need for a client that has set task(s) that need to be performed. Scripts can provide the quick development for a set of commands to perform the desired task(s) without the overhead of a high level language.
Sometimes quick script commands can provide the means to performance for a set of tasks that need to lead to a solution without overhead of a compiled high level language.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Originally Posted by allend
... Consider awk, which is written as a script, but is compiled to machine code before it is actually run. This explains why an awk script completes more quickly than a bash script written to perform the same task.
Didn't know that, is it pure mc or just byte compiled?
Scripts generally don't need to be compiled, and errors stop them from running. Programs (usually written in some form of C) need to be compiled to run, and errors won't stop them from running.
How? Errors will stop program execution, whatever the language. Depending on the kind of error, you may get either a thrown exception or segmentation fault. Believe me, errors will stop any program from running.