I have an application that appends to the same log file. As this file is rather large (around 8 gb), I'd like to extract portions based on the timestamp at the beginning of the line.
-bash-3.2$ cat application.log | egrep --color "Starting Application|Exception"
08:46:01.328 [main] INFO Starting Application...
09:14:53.670 [Thread-1] ERROR Resolver - Caught exception -> com.jgoodie.AuthzException: Authorization failed
Caused by: com.jgoodie.AuthzException: Authorization failed
09:56:15.739 [main] INFO Starting Application...
10:17:08.932 [Thread-1] ERROR Resolver - Caught exception -> com.jgoodie.AuthzException: Authorization failed
Caused by: com.jgoodie.AuthzException: Authorization failed
In the above example, I'd like to extract the logs for the first run of the application (between 08:46:01.328 and 09:56:15.739). Is there any simple way (preferably a one liner) to do this?
Thanks