Nelson Serafica wrote:
> **Actually, its a simple script. I'm not also a programmer.
>
> #!/bin/sh
> file=/usr/local/apache2/htdocs/mrtg/clients/Link/10.10.0.222.110.html
> com2=`cat $file  | egrep "kb/s|b/s" | awk 'NR == 3 {print}' | awk -F\> 
> '{print $2}'  |awk -F\( '{print $1}'`
> com3=`cat $file  | egrep "kb/s|b/s" | awk 'NR == 6 {print}' | awk -F\> 
> '{print $2}'  |awk -F\( '{print $1}'`
my low awk level barely can read your code but, again, my advice would 
be "keep" the kb/s or b/s in com2 and com3 (com2 ends up with something 
like 'b/s 1000' instead of just the number) and then "save" the number 
with the proper scale.

Luis Carlos.

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to