Closed jaromil closed 1 year ago
What would the advantages be in practice? I mean, what modern system does not support bash but supports sh? The only case I could think of is running this script in alpine linux images, where bash is not included, but even there it can be easily installed. In short, I don't see the reason to restrict to sh functionality for benefits that are not clear to me. @jaromil Lmk what you think!
@jaromil What is failing on your end? Could you give more detail? It works fine on my end on all zsh, bash, and sh.
Nothing failing! I have been scripting a lot in zsh and bash, nowadays I wish it would have been all in sh: portable and easier to analyse with stuff like shellcheck. Also BSD systems have native support without installing anything else.
The script is still small enough to migrate to /bin/sh without much effort, leading to a more portable script. I would suggest you do so.