Skip to content

Instantly share code, notes, and snippets.

@ebot
Created February 15, 2010 18:26
Show Gist options
  • Save ebot/304860 to your computer and use it in GitHub Desktop.
Save ebot/304860 to your computer and use it in GitHub Desktop.
Reads through specified log files to get the list of files that were processed.
#!/usr/bin/env ruby -wKU
output = File.new( 'processed.yml', 'w' )
(1..85).each do |number|
file_name = "batch_acquire_results_#{number}.log"
puts "Reading #{file_name}"
input = File.new( file_name, 'r' )
output << "#{file_name}\n"
input.each_line do |line|
output << " - #{line.chomp.strip}\n" if line.index( ' Processing' ) != nil
output.flush
end
end
output.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment