This is how my log file looks like:
2019-03-17 13:49:01.267 MESSAGE Web 2019-03-17 13:50:04.325 ERROR error msg: ConnectivityException 2019-03-17 14:15:20.326 ERROR error msg: Error occurred invoking AgentConnector.call() method 2019-03-17 14:30:30.326 WARNING start: Web 2019-03-17 14:49:12.327 ERROR exec-10 - null
I have to read through this log every 5 mins and catch any error happened during last 5 mins i.e when I read this log at 14:16 pm, I should only get 1 error, which happened at 14:15 but not 13:50 pm error. My script exits at every run.
I read we can do this using "dd" but I m not getting it to write in a script form.
dd if="$in_file" iflag=skip_bytes,count_bytes,fullblock bs="$block_size" skip="$start" count="$copy_size"
Any other way to get this done.