1. 1
  1.  

  2. 1

    Since I’m more comfortable in Python than JS, when bash gets hairy I tend to switch to Python and use the subprocess module to invoke commands.

    Is there a standard way to invoke shell commands from within “normal” Javascript (e.g. whatever node.js uses)?

    1. 2

      There’s exec and spawn which can be used from JS/node to execute a shell command. Alternatively, you can run JS from the shell with the -e option in node.