Skip to content

Instantly share code, notes, and snippets.

@jshawl
Created January 23, 2014 19:50
Show Gist options
  • Select an option

  • Save jshawl/8585551 to your computer and use it in GitHub Desktop.

Select an option

Save jshawl/8585551 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var sys = require('sys');
var exec = require('child_process').exec;
var child;
var path = "/var/ww..."
var command = "cd "+ path + "&& touch afile && exit"
function puts(err,stdout,stderr){
if(err){
sys.puts(err)
}
sys.puts(stdout)
}
exec(command, puts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment