[Gllug] Sum trouble

Leigh Mason leigh at silkstream.net
Tue Apr 8 10:19:48 UTC 2003


It seems there are many ways to skin the cat  :)

Thanks all

Leigh

Richard Jones wrote:

>On Tue, Apr 08, 2003 at 10:12:04AM +0100, Leigh Mason wrote:
>
>>Good morning all
>>
>>I am trying to calculate the total sum of bytes listed in the apache 
>>access_log.
>>I have retrieved the particular column which gives me a list of byte 
>>values thus:
>>cut -f10 -d" " access_log
>>
>>I can't seem to find any text type utility that will sum these values.
>>What would be the usual procedure to achieve this?
>>
>
>The problem you'll have with all the methods suggested below is
>that they'll overflow at 2 or 4 GiB. (I assume you have a fair-
>sized amount of data being transferred?)
>
>AFAIK you're stuck with writing a C program using 'long long' or
>using a language with bignum support.
>
>Rich.
>



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list