I've got a script I run like this:
node script.js
From within script.js, I would like to pass a variable back out to the shell for continued use.
I'll say it again in case you didn't get it the first time: basically, running the JS to come up with a variable, then I want to use that variable for a shell command. I tried looking this up and I didn't have much luck figuring it out. Simply doing console.log(foo=bar) doesn't work.