
28 May
2024
28 May
'24
9:04 a.m.
Hi everyone I quite often need to do some quick and dirty statistical calculations on the command-line and I typically use cat and sed to extract the data that I need from text files. In the past, I've then switched to LibreOffice Calc for some basic statistics like mean/stdev. Today, I finally spent a bit more time having a look around what else I can use directly on the command-line and came across the following that fits the bill perfectly: datamash - https://www.gnu.org/software/datamash/ With that tool, I can finally apply a single command-line to textual output for generating a quick mean/stdev: ... | datamash mean 1 sstdev 1 --header-out mean(field-1) sstdev(field-1) 577.62815533981 128.99238940453 Cheers, Peter