Skip to content

Instantly share code, notes, and snippets.

@RamonGilabert
Last active February 20, 2016 23:12
Show Gist options
  • Save RamonGilabert/747a8ac423dcd02fc20f to your computer and use it in GitHub Desktop.
Save RamonGilabert/747a8ac423dcd02fc20f to your computer and use it in GitHub Desktop.
Talk from the your NodeJS file to the Linux terminal.
// 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