Command line interface github.com

dategrep prints lines matching a time range

dategrep reads a file and prints every line with a timestamp that falls into a user defined time range. When invoked on a normal file, dategrep uses a binary search to find the first matching line.

The usefulness of this is perhaps best understood by seeing a few examples:

dategrep --start "12:00" --end "12:15" syslog
dategrep --end "12:15" --format "%b %d %H:%M:%S" syslog
dategrep --last-minutes 5 syslog
cat syslog | dategrep --end "12:15"
0:00 / 0:00