Thanks so much to everyone (and I think everyone resonded!). This was very
educational to me. I need to become more fluent in awk.
Most evryone had an awk solution that went something like this:
>awk '{sum+=+1} END {print sum}' filename
A way to sum each line as you add them, with the total as the additional
last line:
>awk {'print sum += $1'} filename
Here was a pretty slick example of using awk that way"
>ls -l | awk '{sum+=5} END {print sum}'
This totals the file sizes in that directory.
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Received on Wed May 29 2002 - 18:55:00 NZST