- Learning Linux Shell Scripting
- Ganesh Naik
- 134字
- 2021-06-25 22:02:45
Compiler and interpreter – differences in process
In any program development, the following are the two options:
- Compilation: Using a compiler-based language, such as C, C++, Java, and other similar languages
- Interpreter: Using interpreter-based languages, such as Bash shell scripting.
When we use a compiler-based language, we compile the complete source code and, as a result of compilation, we get a binary executable file. We then execute the binary to check the performance of our program.
On the other hand, when we develop the shell script, such as an interpreter-based program, every line of the program is input to the Bash shell. The lines of shell script are executed one by one sequentially. Even if the second line of a script has an error, the first line will be executed by the shell interpreter.