Date: Sat, 04 Aug 2001 08:11:25 +1000 From: BSD Freak <bsd-freak@mbox.com.au> To: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Adding Number in a File Message-ID: <ca5a6dca5556.ca5556ca5a6d@mbox.com.au>
next in thread | raw e-mail | index | archive | help
Hi guys, I have usage logs which output something like the following in a sing text file, called say /var/logs/usage.log 00000000000105483732 00000000000000045532 00000000000000038451 00000000000000071624 00000000000000054925 00000000000000025485 00000000000000031866 00000000000000051580 00000000000000055660 00000000000000027465 00000000000000033564 00000000000000060264 00000000000000037315 00000000000000023527 00000000000003900814 00000000000000643809 I want to add up all the numbers on each line of this file and output the sum to standard output. Any ideas how to do this ?? Thanks in advance..... --------------------------------------------------------------------- Listen to your emails from any telephone http://www.mbox.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ca5a6dca5556.ca5556ca5a6d>
