W pliku node.js chciałbym znaleźć sposób uzyskania wyniku polecenia terminala systemu Unix. Czy jest jakiś sposób to zrobić?Uzyskaj wynik polecenia powłoki w pliku node.js
function getCommandOutput(commandString){
//now how can I implement this function?
//getCommandOutput("ls") should print the terminal output of the shell command "ls"
}
Czy to duplikat, czy też opisać coś zupełnie innego? http://stackoverflow.com/questions/7183307/node-js-execute-command-synchronously-and-get-result –
[This] (http://davidwalsh.name/sync-exec) może Cię zainteresować. – benekastah