read in file from command line, spit it out

master
Matt Huntington 10 years ago
parent 13638abfec
commit c7b98d37cd

@ -1,2 +1,13 @@
#!/usr/bin/env node
console.log(process.argv);
fs = require('fs');
var parseFile = function(data){
console.log(data);
}
fs.readFile(process.argv[2], 'utf8', function(err, data){
if(err){
console.log(err);
} else {
parseFile(data);
}
});

Loading…
Cancel
Save