[Gllug] Sum trouble

Allen Baranov allen at isa.co.za
Tue Apr 8 12:35:08 UTC 2003


Hi,

On Tuesday 08 April 2003 13:09, Tethys wrote:
> Richard Jones writes:
> >I looked at this for a while thinking ... 'is he being incredibly smart??'
> >
> :-)
> :
> >I *think* the answer is no.
>
> Correct. It'll give you the total number of digits used to display
> the values, not the sum of the numbers they represent...

No problem.... stick a bit of perl in the middle...

cut -f10 -d' ' access_log |perl -n -e '$a="h" x $_ ; print "$a"' |wc -c

I *knew* the "x" function was good for something.

Allen Baranov





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




More information about the GLLUG mailing list