Trying to print out specific times of logs based on recommendation from this thread from super user. I am not sure why my patterns are not being matched by sed. I have the sample date and time I am using pasted here. If I use
sed -n '/2014-03-27 07:00:00/ , /2014-03-27 11:25:00/p' log-file-name
I am expecting it to print all lines that matches between 7 am to 11 am . But I get zero matches. If I remove "-n", it prints the entire lines from 3 am to 16:14 as result. I tried tweaking the sed command above with single and double quotes and tried different spacing options. But the results are always "all or none" . Can somebody please explain why sed is not printing the lines for the hour window I am asking it to print?