4 ms·
Ask HN: Do you use JavaScript as Unix shell scripting language?
Script languages like Perl and Tcl can be embedded in shell scripts. On WinNT series I have used JScript (WHS) for years.
Do you use JavaScript as your Unix shell scripting language? Can you recommend it? Or do you prefer the sh/bash syntax for glue scripts?
On MDN (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Shells) I found e.g.
ShellJS (https://github.com/arturadib/shelljs).
- BorisMelnik 12y agoDefinitely an interesting concept. Really interested to see if anyone is going to answer yes. For me I stick with 'sh' and never really even considered other options, with the exception of csh (c shell) which I dabbled in but really never stuck. This also may be because I am not a hardcore JS programmer. I also have always really considered bash to be a huge part of Linux.
- auganov 12y agoWell, I did use node.js a couple of times for stuff that would normally be a shell script. Like simple scripts spawning some processes and killing them on certain events. But I don't think I'd use a JavaScript shell. sh seems more writable for shell usecases. But if there was a powerful js shell comparable to zsh I might! Something like emacs shell where you can use a kind-of-bash syntax and elisp at the same time would be cool.