regex - Is awk the fastest way to search for a date/time range in a log file? -


i'm trying make script search log lines have occurred between time/date range in log file.

i tried using solution in page:

filter log file entries based on date range

that solution works fine, takes bit complete. there other methods performing search may yield results faster? i'm not being ocd speed in case, it's searching through syslog files contain several gigabytes of data each, if shave time off of search fantastic. grep regex came mind, i'm not sure if make of difference.

here log format used in log files:

2014-12-31t23:59:33-05:00 device logdata

the lines sorted, can use look command. should faster awk or grep, because uses binary search.


Comments