say I run a command that outputs space separated values over lines. Some of which are numbers. Is there a utility I can use to calculate the mean, median, standard deviation of these numbers? something like 'cut' but that outputs these statistics.
say I run a command that outputs space separated values over lines. Some of which are numbers. Is there a utility I can use to calculate the mean, median, standard deviation of these numbers? something like 'cut' but that outputs these statistics.
Check out st: https://github.com/nferraz/st or sta (recommended): https://github.com/simonccarter/sta
From GitHub:
You might also consider using clistats. It is a highly configurable command line interface tool to compute statistics for a stream of delimited input numbers.
I/O options
Parsing options
Statistics options
NOTE: I'm the author.
The R language would be perfect for this. It runs in the terminal, its free and probably the most popular statistics languages out there. So, it has tons of documentation on how to do neat things, including the ones you are asking for.