> > cat bla | grep ' 1[0123]:'|awk '{s += $10}END{print "sum is", s, " average
> > is", s/NR}'
> In addition to the "useles use of cat award", this also qualifies for the
> "useles use of grep award" :)
useles as in use less s in useless that is. :)
It's a 10 seconds fix for which I used a test file called bla.
Please don't shoot me...
> This, by the way, selects " 10:" which probably stands for the
> timeframe "09:55:00 .. 10:00:00". After all, a rate is not known
> until the time has passed; the entry at 10:00 should thus describe
> the past, not the future. Similarly 14:00:00 is not selected while
> it probably should.
You're right there though..
Serge.
> -----Original Message-----
> From: Alex van den Bogaerdt [mailto:[EMAIL PROTECTED]
>
> To save cpu cycles, file descriptors and what more:
>
> <bla awk '/ 1[0123]:/{s+=$10}END{print "sum is",s," average
> is ",s/NR}'
>
> HTH
> Alex
--
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