4 ms·
Could you clarify? Unless the systems you are using require POSIX compatibility, why limit yourself? I would agree that using a proper programming language for
by athorax 8y ago
Could you clarify? Unless the systems you are using require POSIX compatibility, why limit yourself? I would agree that using a proper programming language for anything more than fairly basic scripts would be a better option, but I don't necessarily see the harm.
- Sir_Cmpwn 8y agoWell, for one, limiting yourslef is a good exercise in restraint. POSIX shell is simpler than the approach shown here. Using a simpler approach keeps your code more readable and understandable, and using POSIX shell as a baseline means a wide variety of people can understand what your code is trying to accomplish. And you never know, you may someday find out that you want to move to an OS which doesn't support bash, or you start to distribute your software and the complaints roll in from the BSD users trying to port it to their OS, or bash makes some backwards-incompatible changes to some arcane behaviors this tool relies on, and since bash isn't standardized you didn't know until it was too late. I wrote a blog post about this, if you want to read more: https://drewdevault.com/2018/02/05/Introduction-to-POSIX-shell.html https://drewdevault.com/2018/02/05/Introduction-to-POSIX-she...