|
|
|
|
|
by simias
4358 days ago
|
|
I've never understood why anyone would inflict oneself with bash scripting. If you really need something portable you should use standard /bin/sh anyway since bash is not installed by default everywhere (I believe many linux distros don't even ship with bash anymore, but a lightweight clone called "dash"?). And if you don't care about portability out of the box, why not use... Well basically anything else? Perl, python, ruby, lua, scheme, whatever. The only shell scripts I ever write are basically a list of command to execute sequentially. If I need something more complex (control flow, user input, proper error handling, nontrivial string manipulation) I switch to some other programming language, it's just not worth the pain. |
|
The reason to use dash instead of bash is speed and to a lesser extent memory usage. The goal isn't to stop needing bash, it's to speed up boot times etc. Or at least it was five years ago when this transition was happening.