In a node.js, I\'d like to find a way to obtain the output of a Unix terminal command. Is there any way to do this?
function getCommandOutput(commandString){
Thanks to Renato answer, I have created a really basic example:
const exec = require('child_process').exec exec('git config --global user.name', (err, stdout, stderr) => console.log(stdout))
It will just print your global git username :)