Выполните и получите вывод команды оболочки в node.js
В файле node.js я хотел бы найти способ получить выходные данные команды терминала Unix. Есть какой-либо способ сделать это?
function getCommandOutput(commandString){
// now how can I implement this function?
// getCommandOutput("ls") should print the terminal output of the shell command "ls"
}