HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

st — Print basic descriptive statistics from input numbers. More information: <https://github.com/nferraz

Submitted by: @import:tldr-pages··
0
Viewed 0 times
descriptivecommandfromcliprintststatisticsbasic

Problem

How to use the st command: Print basic descriptive statistics from input numbers. More information: <https://github.com/nferraz/st>.

Solution

st — Print basic descriptive statistics from input numbers. More information: <https://github.com/nferraz/st>.

Print count, min, max, sum, mean, and standard deviation for numbers in a file:
st {{path/to/file}}


Print statistics from stdin:
cat {{path/to/file}} | st


Print only the sum of the numbers:
st {{[-s|--sum]}} {{path/to/file}}


Print only the mean of the numbers:
st {{[-m|--mean]}} {{path/to/file}}


Print only the standard deviation:
st {{[-s|--sd]}} {{path/to/file}}


Transpose output (keys in one column, values in another):
st {{[-t|--transpose]}} {{path/to/file}}

Code Snippets

Print count, min, max, sum, mean, and standard deviation for numbers in a file

st {{path/to/file}}

Print statistics from `stdin`

cat {{path/to/file}} | st

Print only the sum of the numbers

st {{[-s|--sum]}} {{path/to/file}}

Print only the mean of the numbers

st {{[-m|--mean]}} {{path/to/file}}

Print only the standard deviation

st {{[-s|--sd]}} {{path/to/file}}

Context

tldr-pages: common/st

Revisions (0)

No revisions yet.