bash - Trying to parse logfile based on start and end time -
i trying parse large zipped logfile , collect matching parameters within time range:
wed nov 3 09:27:20 2010 : remote ip address 209.151.64.18 wed nov 3 11:57:22 2010 : secondary dns address 204.117.214.10
i able grep other parameter using line below: gzcat jfk-gw10-asr1.20100408.log.gz | egrep gabriel|98.126.209.144\|13.244.137.58\|16.151.65.121
i have been unable parse start time and/or end time. assistance appreciated.
assuming log file chronologically sorted e.g.:
gzcat jfk-gw10-asr1.20100408.log.gz | sed -n '/nov 3 09:/,/nov 3 11:/p' to log entries between 09:00:00 , 11:59:59 on nov, 3rd.
Comments
Post a Comment