Created
February 13, 2014 08:11
-
-
Save brandon-barker/8971522 to your computer and use it in GitHub Desktop.
From http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback
This file contains hidden or 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
var exec = require('child_process').exec, | |
child; | |
child = exec('cat *.js bad_file | wc -l', | |
function (error, stdout, stderr) { | |
console.log('stdout: ' + stdout); | |
console.log('stderr: ' + stderr); | |
if (error !== null) { | |
console.log('exec error: ' + error); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment