Skip to content

Instantly share code, notes, and snippets.

@Maslor
Created September 28, 2015 14:04
Show Gist options
  • Select an option

  • Save Maslor/694b5b2dbcc1eefdd82b to your computer and use it in GitHub Desktop.

Select an option

Save Maslor/694b5b2dbcc1eefdd82b to your computer and use it in GitHub Desktop.
var fs = require('fs');
var path = process.argv[2];
fs.readFile(path,'utf8', function(err,data){
var spltArr = data.split('\n');
console.log(spltArr.length-1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment