Date: Tue, 19 Oct 1999 22:14:11 -0700 From: dannyman <dannyman@dannyland.org> To: David Scheidt <dscheidt@enteract.com> Cc: chat@freebsd.org Subject: Re: averaging numbers in a stream Message-ID: <19991019221411.A893@stumpy.dannyland.org> In-Reply-To: <Pine.NEB.3.96.991020000936.58813A-100000@shell-3.enteract.com>; from David Scheidt on Wed, Oct 20, 1999 at 12:12:45AM -0500 References: <19991019203905.B30514@stumpy.dannyland.org> <Pine.NEB.3.96.991020000936.58813A-100000@shell-3.enteract.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 20, 1999 at 12:12:45AM -0500, David Scheidt wrote: > 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}' Smarty pants! :) -d -- dannyman - http://www.dannyland.org/~dannyman/ 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?19991019221411.A893>