Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main show are the techniques for writing portable shell scripts, not the compiler.

If you want something one would actually use, try my project tuish:

http://github.com/alganet/tuish



Is there a linter to ensure scripts are portable across shells? I try to write them like that but I'm certainly no master so I write them to work with busybox.


A linter, not yet.

You can use what I use: https://github.com/alganet/shell-versions

It's a container with lots of shells that you can test. Like esvu but for the shell.

Might have a little outdated docs, hit me with an issue if you use it and face any problems (I'm also the author).


I think shellcheck helps quite a lot, you must set type to "sh" (not bash) somewhere in the comments though...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: