2 ms·
Shellcheck will prevent you from making any egregious whitespace errors. You can dynamically build up an arguments list using bash arrays. Errexit and pipefail
by hamandcheese 2y ago
Shellcheck will prevent you from making any egregious whitespace errors. You can dynamically build up an arguments list using bash arrays. Errexit and pipefail options prevent you from ignoring errors.
I agree that some work is better suited to a real programming language, however the driving force isn't the problems you speak of, which are trivial, it's when the logic/control flow of the overall problem becomes more complex.
- IshKebab 2y ago> Shellcheck will prevent you from making any egregious whitespace errors. It will try to prevent you. It isn't perfect though, and whitespace errors are only the tip of the iceberg. Shellcheck doesn't tell you to enable pipefail for example, so there's a huge foot-gun. Pipefail itself is kind of impossible to use correctly anyway.