|
|
|
|
|
by JoyfulTurkey
559 days ago
|
|
Dealing with this at work right now. Digging through thousands of lines of Bash. This script wasn’t written a long time ago, so no clue why they went with Bash. The script works but it always feels like something is going to break if I look at the code the wrong way. |
|
See my comment here, with some details: https://news.ycombinator.com/item?id=42354095
(I created the project and the wiki page. Right now the best bet is to join https://oilshell.zulipchat.com/ if it interests you. People who want to test it out should be comfortable with compiling source tarballs, which is generally trivial because shells have almost no dependencies.)
The first step is:
Or to run under bash And then run with "osh myscript.bash"OSH should run your script exactly the same as bash, but with better error messages, and precise source locations.
And you will get some strictness errors, which can help catch coding bugs. It's a little like ShellCheck, except it can detect things at runtime, whereas ShellCheck can't.