--- Vasil Kolev <[EMAIL PROTECTED]> wrote:

> On чт, 2004-10-21 at 16:48 +0300, Georgi Genov
> wrote:
> > Georgi Genov wrote:
> > 
> > > Ivailo Ivanov wrote:
> > >
> > >>                  Zdraveite,
> > >> Imam fail sas sledata struktura:
> > >
> > >
> > > #!/bin/sh
> > > source_ip_db="10.0.1.2 10.0.1.3 10.0.1.4
> 10.0.1.5 10.0.1.6"
> > > for $source_ip in $source_ip_db; do
> > > tmp_trafic_ip=`cat trafic.log | grep "$source_ip
> " | tr -s ' ' | awk 
> > > '{ print $3 }'`
> > > trafic_db[$source_ip]=$(echo
> "${trafic_db[$source_ip]} + 
> > > $tmp_trafic_ip" | bc)
> > > echo "$source_ip ${trafic_db[$source_ip]}"
> > > done
> > > exit 0
> > >
> > >
> > да се fixna дока е време :)
> > 
> > #!/bin/sh
> > source_ip_db="10.0.1.2 10.0.1.3 10.0.1.4 10.0.1.5
> 10.0.1.6"
> > for source_ip in $source_ip_db; do
> > tmp_trafic_ip=`cat trafic.log | grep "$source_ip "
> | tr -s ' ' | awk '{ 
> > print $3 }'`
> > trafic_db[$source_ip]=$(echo
> "${trafic_db[$source_ip]} + $tmp_trafic_ip" 
> > | bc)
> > echo "$source_ip ${trafic_db[$source_ip]}"
> > done
> > exit 0
> 
> Една кратка препоръка - 
> source_ip_db=`cat traffic_log|cut -d ' ' -f
> 1|sort|uniq`
> , понеже човека каза, че няма
> идея каквот точно има като
> sources (но
> нали в тях няма интервали?:)
> Че иначе задачката става
> по-сложна).
> 
> п.с. според мене реалния
> инструмент за целта си е
> бозата данни, това
> изобщо не се scale-ва...
> 
Super - mersi mnogo. Sega ostava samo to4kite da
fix-nem.
./usertraf: line 1: 172.1.1.162: syntax error in
expression (error token is ".1.1.162")
./usertraf: line 7: 172.16.11.162: syntax error in
expression (error token is ".1.1.162")







                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================

Reply via email to