Hacker News new | ask | show | jobs
by wavephorm 5303 days ago
Maybe not a shell, but for simple scripts you can save your js code with the following at the top:

  #!/usr/bin/env node
Then save the file as "myscript" and run it as any other executable. Node already has a repl for experimentation.
1 comments

yes, and I do that often.

My point is that Javascript + Node would make the basis for a nice bash replacement.

If you like JavaScript. Java would be better. There is the Bean Shell. That doesn't replace BASH for what it does well. In fact, that's the point of BASH, not to replace traditional languages but to bind their output programs together.