Skip to content

Instantly share code, notes, and snippets.

@toddlemoine
Created April 21, 2016 18:10
Show Gist options
  • Save toddlemoine/98af59bf408d9230df61fd018ac65605 to your computer and use it in GitHub Desktop.
Save toddlemoine/98af59bf408d9230df61fd018ac65605 to your computer and use it in GitHub Desktop.
var fs = require('fs'),
readline = require('readline'),
glob = require('glob');
var files = glob.sync('something*.*');
files.forEach(function(file) {
fs.readFileSync(file, 'utf8').split('\n').forEach(function(line) {
// Do whatever
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment