I'm very new to Ubuntu. I hear people say "shell scripting", "bash scripting".
I wonder are they same? Or they are different?
Thanks in advance.
Shell scripting is scripting in any shell, whereas Bash scripting is scripting specifically for Bash. In practice, however, "shell script" and "bash script" are often used interchangeably, unless the shell in question is not Bash.
EDIT: Actually, the default scripting shell in Ubuntu is dash, while the default interactive shell (what you get if you pull up a terminal) is Bash. Nonetheless, the two terms are still mostly interchangeable.
Shell scripting and
It is important to note that both
Often shell scripts have the suffix
However, it is important to note that the results can be different depending on which interpreter is called, as not all
Resources for Bash Shell scripting
It is sometimes difficult to find useful resources online that follow good practice and that give advice that will allow you to create useful scripts. After
This shows that 'sh' is a symlink to 'dash', and that /bin/bash, which is the default interactive shell on Ubuntu, is an executable that is almost 9 time bigger than /bin/sh.
Indeed, 'man sh' (1590 lines) vs 'man bash' (5459 lines) reveals that bash is a large superset of the traditional 'sh'.
Read more here:
There are multiple shells available for Ubuntu, like
So anytime someone says shell, he is talking about one of those. However, those shells differ a bit from each other. So, when someone talks about