Created
February 15, 2010 18:26
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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