Skip to content

Instantly share code, notes, and snippets.

@joshuakfarrar
Last active August 29, 2015 13:57
Show Gist options
  • Save joshuakfarrar/9470442 to your computer and use it in GitHub Desktop.
Save joshuakfarrar/9470442 to your computer and use it in GitHub Desktop.
var fs = require('fs')
fs.readFile(process.argv[2], function(err, file) {
if (err) return err;
console.log(file.toString().split('\n').length - 1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment