On Mon, Nov 17, 2003 at 06:03:24PM +0000, gab.seun jones.ewulomi wrote: > How could I use grep/awk to grep for data between a time frame > > In Kbits R1 6/1.10 3/105 to R2 31/10/03 10:15:00 3657.07 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 10:20:00 3976.85 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 10:25:00 5088.18 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 11:00:00 3471.26 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 11:05:00 4311.4 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 11:10:00 2000.9 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 12:50:00 3021.64 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 12:55:00 3385.86 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 13:00:00 3483.98 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 13:05:00 3920.98 > In Kbits FR1 6/1.10 3/105 to R2 31/10/03 14:00:00 5627.66 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 14:05:00 5252.07 > In Kbits R1 6/1.10 3/105 to R2 31/10/03 14:10:00 3768.24 > > I can use awk and grep to get required columns and to get data for a set > date but I dont know how to grep for data for between time frames in a day.
< /path/to/your/data sed -n '/ 10:05:/,/ 14:00:/p' or something close. This works ONLY if: a) the file is in sorted order b) the file contains entries for both 10:05 and 14:00 HTH Alex -- http://www.googlism.com/index.htm?ism=alex+van+den+bogaerdt&type=1 -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
