Hacker News new | ask | show | jobs
by 1718627440 231 days ago
I try to execute my scripts with dash, but I am not sure if that is enough. Do you have a good way recommendation to check, that you're not relying on non-portable behaviour short of installing another distro, that doesn't take much effort.
1 comments

Shellcheck [1] is good for checking that. I think it tries to enforce standard behavior if you set the shebang line to /bin/sh.

[1]: https://www.shellcheck.net/

Last time I tried to use that, I was drowning in messages. I was looking for something with less effort. :-)