Fastmash
Fast command-line statistics for delimited text.
Fastmash summarizes, groups and reshapes delimited text and quoted CSV. It
accepts the command language of GNU datamash,
so if you already use datamash, you already know how to use Fastmash.
It also reads quoted CSV directly, gives your result columns stable names, calculates weighted means and selects the highest or lowest complete records. Inspect a table’s health or compare summaries from two exports with the same field selectors and portable arithmetic.
$ cat readings.tsv
site reading
west 2
east 4
west 6
west 7
$ fastmash -H -s -g site count reading median reading < readings.tsv
GroupBy(site) count(reading) median(reading)
east 1 4
west 3 6
Install it with one command, or see other ways:
curl -fsSL https://fastmash.io/install.sh | sh
Fastmash is faster than GNU datamash*
Up to four times faster, on real jobs: quantiles, grouped summaries and millions of decimals.
* In 0.1.0, some disk-spilling sorts and the distinct-value geometric-mean job are slower on native Linux. All results and the method.
And better in other ways
| Feature | GNU datamash 1.9 | Fastmash |
|---|---|---|
| Results | Depend on the CPU and the C math library | Identical on every machine: all arithmetic in software |
| Locales | Need locale data installed; silently fall back to C without it | Built in: numbers in 318 locales, sorting in 194 |
perc:100 | Can read past the end of the values | Returns the largest value |
rmdup on several key fields | Crashes on an assertion | A clear refusal |
Malformed parameters such as strbin:2.0 | Misleading errors or undefined behavior | An accurate error message |
crosstab labels over 511 bytes | Truncated | Kept in full |
Everything else works the same: over 70 operations and modes, the same options, field selectors, grouping, headers and output. For most scripts, switching means changing one word. Migrating from datamash · All differences
Get started
- Install Fastmash on Linux x86-64 or WSL2
- Quick start: a five-minute tour
- Operations: every statistic and transformation
- Quoted CSV and result names: structured input and useful report labels
- Highest and lowest records: keep the records behind the numbers
- Table health and dataset comparison: inspect data and understand changes
Fastmash is open source under the MIT or Apache-2.0 license. Source on GitHub.