command line utility to print statistics of numbers in linux

后端 未结 16 1627
無奈伤痛
無奈伤痛 2020-11-30 18:46

I often find myself with a file that has one number per line. I end up importing it in excel to view things like median, standard deviation and so forth.

Is there a

16条回答
  •  情书的邮戳
    2020-11-30 19:15

    Using "st" (https://github.com/nferraz/st)

    $ st numbers.txt
    N    min   max   sum   mean  stddev
    10   1     10    55    5.5   3.02765
    

    Or:

    $ st numbers.txt --transpose
    N      10
    min    1
    max    10
    sum    55
    mean   5.5
    stddev 3.02765
    

    (DISCLAIMER: I wrote this tool :))

提交回复
热议问题