I have a record file that stores the statuses of our systems by date. The script to generate it runs via cron, so the file is constantly getting longer. I wrote a script that iterated over every line to process it and this took a very long time to do. I've heard that awk is much faster at processing large text files. My problem is that I've never used it. Is it possible to use awk to get all entries within a date range? The dates are all in seconds as they were produced with
date +%s. Here is an example of output that I would like to be able to quickly find data in a range. So for example, how could I get all lines where the first column is between 1344279903 and 1344280204?
1344279903 | 0 | 0 | node | 1 1344279904 | 0 | 0 | node | 2 1344279905 | 0 | 0 | node | 3 1344280202 | 0 | 0 | node | 1 1344280203 | 0 | 0 | node | 2 1344280204 | 99 | 0 | node | 3