1

I have a log file which has entries like below. I want to find only the log entries newer than a given time. What would be a suitable shell script for it?

[2013-06-23 21:31:19,972]  INFO 
[2013-06-23 21:31:20,148]  INFO 
[2013-06-23 21:31:20,148]  INFO 
[2013-06-23 21:31:20,195]  INFO 

1 Answers1

2
awk -v giventime="2013-06-23 21:31:20,150" '$1" "$2 < "["giventime"]"' logfile

If you want to specify the "given time" in a different format, we can accomodate you, but let us know.