#! /bin/bash
user_array=`cat log.*.cdf |cut -d , -f 1 |sort -u |xargs`
for B in $user_array
do
c=2
echo -e "For the IP $B"
echo "" > /tmp/port$$$
while [ $c -le 16 ]
do
cat log.*.cdf |grep $B |cut -d , -f $c |xargs >/tmp/ele$$$
I=0
for N in `cat /tmp/ele$$$`
do
I=`expr $I + $N`
done
echo $I >>/tmp/port$$$
(( c++ ))
done
sleep 2
echo -e "\t `cat /tmp/port$$$ |xargs`"
done
rm -rf *.cdf
/etc/init.d/bandwidthd restart
No comments:
Post a Comment