[rrd-users] Re: grep dates on snmp collected data
Warnes, Jason SktnHR
jason.warnes at saskatoonhealthregion.ca
Tue Dec 9 22:09:24 MET 2003
You may want to try something like this:
grep '^1[012345]/11/2003' <snmp.log>
It should give you what you want in your example. It will basically match
on anything in the [] brackets.
Jason...
-----Original Message-----
From: gab.seun jones.ewulomi [mailto:seun_ewulomi at hotmail.com]
Sent: Monday, December 08, 2003 12:14 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] grep dates on snmp collected data
Hi people,
I use egrep to grep on data of the format below
10/11/2003 00:00 299 0.43 0.45 140.54 68.34 72.2 32
11/11/2003 00:05 301 0.25 0.34 93.56 39.77 53.78 28
12/11/2003 00:10 300 0.34 0.37 113.91 54.08 59.83 32
1) To see all data for just a certain day I usually do
grep '^10/.*/2003' <snmp.log>
2)to see all data for some days I usually do
egrep -e '11/.*/2003' -e '12/.*/2003' snmp.log
Now if I want to see the all data for example from 10/11/2003 - 15/11/2003
how would this be done with awk, egrep or sed.
My main aim is to see/filter all data in a snmp log file just for
mondays-fridays and omitting all the weekend dates.
Any help or advice will be graetlu appreciated.
regards,
seun
_________________________________________________________________
On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list