Date: Wed, 20 Oct 1999 00:12:45 -0500 (CDT) From: David Scheidt <dscheidt@enteract.com> To: dannyman <dannyman@dannyland.org> Cc: chat@freebsd.org Subject: Re: averaging numbers in a stream Message-ID: <Pine.NEB.3.96.991020000936.58813A-100000@shell-3.enteract.com> In-Reply-To: <19991019203905.B30514@stumpy.dannyland.org>
next in thread | previous in thread | raw e-mail | index | archive | help
yn Tue, 19 Oct 1999, dannyman wrote:
> to average. Is there a cleaner way to do this, all on one line, with a fairly
> standard Unix shell? In my case, tcsh.
awk '{ foo += $1} END { print foo/NR}'
David
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.991020000936.58813A-100000>
