

Ask HN: Do you use JavaScript as Unix shell scripting language? - frik

Script languages like Perl and Tcl can be embedded in shell scripts. On WinNT series I have used JScript (WHS) for years.<p>Do you use JavaScript as your Unix shell scripting language? Can you recommend it? Or do you prefer the sh&#x2F;bash syntax for glue scripts?<p>On MDN (https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Shells) I found e.g.  
ShellJS (https:&#x2F;&#x2F;github.com&#x2F;arturadib&#x2F;shelljs).
======
auganov
Well, 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.

------
BorisMelnik
Definitely 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.

