4 ms·
There is absolutely no Bash hate here. If you do an experiment you'll easily find that dash is faster than bash, and since dash basically just a bare POSIX she
by klodolph 6y ago
There is absolutely no Bash hate here.
If you do an experiment you'll easily find that dash is faster than bash, and since dash basically just a bare POSIX shell with very few extensions, a script that runs in dash is more likely to run anywhere (ignoring the fact that nearly every program you call from a shell script comes in both a GNU and BSD variant, and possibly a more minimalist POSIX version).
So I write my shell scripts to dash, which is /bin/sh on my system (Debian).
If you use Bash-isms, you should definitely not put #!/bin/sh at the top of your script, you should be putting #!/bin/bash