用 datamash 统计文本列
对表格文本计算均值、中位数、标准差等。
运行 seq 1 10 | datamash mean 1 sstdev 1,输出均值和样本标准差。
01命令
命令
$ seq 1 10 | datamash mean 1 sstdev 102作用说明
datamash 可在 shell 中完成统计与分组运算:均值、中位数、求和、方差、百分位和交叉表。无需编写脚本即可快速汇总 CSV 或 TSV 列。
03风险
!注意: 默认按空白或制表符分列;其他布局需用 --header-in 和字段参数。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Homebrew formula: datamash依据: Tool to perform numerical, textual & statistical operations. GNU datamash computes descriptive statistics and grouping operations on text tables.
- Official project documentation依据: GNU datamash computes descriptive statistics and grouping operations on text tables.
最后验证: 2026-09-22 · 分类: 开发者