bash
is the default login shell in Ubuntu. Most users use bash
for scripting. Some answers use sh
as the interpreter, even if the question mentioned bash
(force of habit, I assume). (For example, a question about adding commands to startup, or creating launchers.) This can lead to problems where the user has unknowingly used a bashism, and then later on:
But that didn't work! I get some weird error!!1! :(
This also applies to answers where complex shell commands have to be used, such as:
sudo sh -c ...
gnome-terminal -x sh -c ...
Where using bash
may simply make things more easier (at the cost of two letters).
Those who are smart enough to use a different shell known enough to substitute the correct shell.
Unless sh
-compatibility is known for certain, we should refrain from using it at all.