From: Steven Lumos Date: 2006-12-03T18:57:31+09:00 Subject: Re: [OT] calculations on lists of numbers ara.t.howard@noaa.gov writes: > 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? > > cheers. > > -a > -- > if you want others to be happy, practice compassion. > if you want to be happy, practice compassion. -- the dalai lama Sorry this doesn't really answer your question, but... When doing science with piles of columns of numbers in text files, I have got endless mileage out of JDB[1]. It's not only the collection of commands, it's how they painlessly cause a group to standardize on a single format for all program output. % cat db #h x y 1 4 2 5 3 6 % cat db | dbstats -q 4 x | dblistize #L mean stddev pct_rsd conf_range conf_low conf_high conf_pct sum sum_squared min max n q1 q2 q3 mean: 2 stddev: 1 pct_rsd: 50 conf_range: 2.4843 conf_low: -0.48434 conf_high: 4.4843 conf_pct: 0.95 sum: 6 sum_squared: 14 min: 1 max: 3 n: 3 q1: 1 q2: 2 q3: 3 # | dbstats -q 4 x # 0.95 confidence intervals assume normal distribution and small n. # | dblistize Steve [1] http://www.isi.edu/~johnh/SOFTWARE/JDB/