Column Statistics With datamash
Compute mean, median, deviation and more on tabular text input.
Run seq 1 10 | datamash mean 1 sstdev 1 to print the mean and sample deviation.
01Command
Command
$ seq 1 10 | datamash mean 1 sstdev 102What it does
datamash performs statistical and grouping operations from the shell: mean, median, sum, variance, percentiles and cross-tabulation. It is a fast way to summarise CSV or TSV columns without writing a script.
03Risk
!Warning: It assumes column-oriented whitespace or tab-separated input by default; use --header-in and field flags for other layouts.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: datamashEvidence: Tool to perform numerical, textual & statistical operations. GNU datamash computes descriptive statistics and grouping operations on text tables.
- Official project documentationEvidence: GNU datamash computes descriptive statistics and grouping operations on text tables.
Last verified: 2026-09-22 · Category: Developer