Skip to content

Instantly share code, notes, and snippets.

@kyanny
Created November 1, 2011 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyanny/1330897 to your computer and use it in GitHub Desktop.
Save kyanny/1330897 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var spawn = require('child_process').spawn,
wget = spawn('curl', ['http://www.livedoor.com/']);
wget.stdout.on('data', function(data) {
console.log('stdout: ' + data);
});
wget.stderr.on('data', function(data) {
console.log('stderr: ' + data);
});
wget.on('exit', function(code) {
console.log('exit ' + code);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment