Execute a Unix Shell Command in Node.js

var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) {sys.puts(stdout)}
exec("ls -la", puts);

STEPS
2 - create newFile.js
3 - copy in text above & save
4 - type shell command:  node newFile.js
5 - output of "command" inside of exec() will show in console