[mrtg] Re: Need help with TIME

Alex van den Bogaerdt alex at ergens.op.HET.NET
Thu Feb 28 22:56:04 MET 2002


Max Kipness II wrote:

> Here is what I'm using:
>  
> time lynx -crawl -dump www.yahoo.com <http://www.yahoo.com>
> -connect_timeout=5 > /dev/null

> I'm trying to capture the line that starts with real (then parse with awk) ,
> but when I added "|grep real" to the end of the line, it tries to add that
> command to the timing process and still prints out all three time results.

Try to put the entire command inside parentheses.  Then redirect stderr
to stdout and process with awk:

(time lynx ....) 2>&1 | awk '/^real/ { print $2 }'

You'll have to alter the print command, just as you had to do
anyway :)

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list