var cmd = `ls cd foo ls` var exec = require('child_process').exec; exec(cmd, function(err, stdout, stderr) { console.log(stdout); })