Bash is definitely interpreted; I do not think you have a reasonable question.
There may be some disagreement over whether this is a language. It is intended primarily for interactive use by executing commands provided by the operating system. For a lot of this particular use, if you just type commands like
echo hello
or
cp foo.txt bar.txt
it’s easy to think that it is “just” for simple commands. In this sense, it is very different from interpreted languages such as Perl and Python, which, although they can be used interactively, are mainly used to write scripts (interpreted programs).
One consequence of this emphasis is that its design is optimized for interactive use. Strings do not require quotes, most commands are executed immediately after they are entered, most of the things you do with it will call external programs, not built-in functions, etc.
But, as we know, it is also possible to write scripts using bash, and bash has many functions, in particular flow control constructs, which are mainly used in scripts (although they can also be used on the command line).
Another difference between bash and many scripting languages is that the bash script is read, parsed, and executed in order. A syntax error in the middle of the bash script will not be detected until execution reaches it. A Perl or Python script, by contrast, is parsed completely prior to execution. (Things like eval can change this, but the general idea is true.) This is a significant difference, but it does not indicate a sharp dividing line. If something makes Perl and Python more like compiled languages.
Bottom line: Yes, bash is an interpreted language. Or, perhaps more accurately, bash is the interpreter for the interpreted language. (The name "bash" usually refers to a shell interpreter or interpreter, not what it interprets.) It has some significant differences from other interpreted languages that were developed from the very beginning for scripting, but these differences are not enough to remove it from the category "interpreted languages."
Keith thompson
source share