Last active
February 20, 2016 23:12
-
-
Save RamonGilabert/747a8ac423dcd02fc20f to your computer and use it in GitHub Desktop.
Talk from the your NodeJS file to the Linux terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Talk from the your NodeJS file to the Linux terminal. | |
var sys = require('util'); | |
var exec = require('child_process').exec; | |
function log(error, stdout, stderr) { console.log(stdout); } | |
exec('ls', log); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment