Using Awk to Search to a Certain point in File

a command like the one below will search a file from the date and time specified to the END of the log.

awk "/^2011-12-26 14:37/,0" /apps/prodction.log

How do i make it so that it doesn't search to the END of the log but instead stops at a specified section of the log.

for instance, if i wanted to only search from "^2011-12-26 14:37" to "^2011-12-26 14:58", how do i modify the above awk syntax to do that?

awk '/^2011-12-26 14:37/,/^2011-12-26 14:58/' file
1 Like