I have a log file that consists of many timestamps in this fashion:
[2010/02/21 11:01:25]
since the log files are large, I'd like to use a quick Ruby excerpt to be able to see just the text between two inclusive times.. say from 11:01..11:59
Using something like
while line = gets
puts line if line =~/start/ .. line =~ /end/
end
what's the best way to go about it?
bonus points if you can show how it's done on the command line.