Joel VanderWerf wrote:

> Paul Lutus wrote:
>> ara.t.howard / noaa.gov wrote:
>> 
>>> for years i've felt that i should be able to pipe numerical output into
>>> some unix command like so
>>>
>>>    cat list | mean
>>>    cat list | sum
>>>    cat list | minmax
>>>
>>> etc.
>>>
>>> and have never found one.  right now i'm building a ruby version -
>>> before i continue, does anyone know a standard unix or ruby version of
>>> this?
>>
>> It is so easy to create in Ruby, a matter of minutes, that it is not
>> terribly important to do the search you are suggesting.
> 
> Disagree.

It's a bit too late to disagree, in the face of the evidence that I said it,
then I did it.

> I would like to know if a unix version exists, since it will 
> certainly be faster than ruby, run in less memory, and probably exist in
> environments where ruby doesn't. So I think the search is worth while.

Yes, all true, but that isn't what you disagreed with.

A number of *nix hands will probably put forth solutions that rely on awk or
bc (something I might have done in years past), and they will probably be
faster, and they certainly exist, and no need to write any Ruby code.

But writing something quick and serviceable in Ruby was extremely easy.

-- 
Paul Lutus
http://www.arachnoid.com