in reply to
Re^2: Extracting Log File data for a given date range
in thread Extracting Log File data for a given date range
I had this problem before. I ended up writing a utility script I call 'grange' for 'grep a range'.
It depends on the fact that I'm usually parsing logfiles so the dates are sequential. So I used the range operator .. to match lines between the start and end regexes.
If that matches your situation, then here's the whole utility:
print "Usage: $0 <start pattern> <end_pattern>\n" and exit unless
+@ARGV == 2;
$start = shift @ARGV; $end = shift @ARGV;
next if 1 .. /$start/;
last if /$end/;