Miller 5.3.0 已发布,Miller 是一个类似 sed、awk、cut、join 和 sort 工具,用来处理基于命名索引的数据,如 CSV、TSV 和 tabular JSON 。 该版本包括文档改进和 bug 修复,以及如下特性: Comment strings in data files: mlr --skip-comments allows you to filter out input lines starting with #, for all file formats. Likewise, mlr --skip-comments-with X lets you specify the comment-string X. Comments are only supported at start of data line. mlr --pass-comments and mlr --pass-comments-with X allow you to forward comments to program output as they are read. The count-similar verb lets you compute cluster sizes by cluster labels. While Miller DSL arithmetic gracefully overflows from 64-integer to double-precision float (see also here), there are now the integer-preserving arithmetic operators .+ .- .* ./ .// for those times when you want integer overflow. There is a new bitcount function: for example, echo x=0xf0000206 | mlr put '$y=bitcount($x)'produces x=0xf0000206,y=7. Issue 158: mlr -T is an alias for --nidx --fs tab, and mlr -t is an alias for mlr --tsvlite. The mathematical constants π and e have been renamed from PI and E to M_PI and M_E, respectively. (It's annoying to get a syntax error when you try to define a variable named E in the DSL, when A through D work just fine.) This is a backward incompatibility, but not enough of us to justify calling this release Miller 6.0.0. 请查阅发行主页了解详情 下载地址: Source code (zip) Source code (tar.gz) 效果示例: before county,tiv_2011,tiv_2012,line,construction SEMINOLE,22890.55,20848.71,Residential,Wood MIAMI DADE,1158674.85,1076001.08,Residential,Masonry PALM BEACH,1174081.5,1856589.17,Residential,Masonry MIAMI DADE,2850980.31,2650932.72,Commercial,Reinforced Masonry HIGHLANDS,23006.41,19757.91,Residential,Wood HIGHLANDS,49155.16,47362.96,Residential,Wood DUVAL,1731888.18,2785551.63,Residential,Masonry ST. JOHNS,29589.12,35207.53,Residential,Wood after $ mlr --icsv --opprint --barred \ put '$tiv_delta = $tiv_2012 - $tiv_2011; unset $tiv_2011, $tiv_2012' \ then sort -nr tiv_delta flins.csv +------------+-------------+----------------+ | county | line | tiv_delta | +------------+-------------+----------------+ | Duval | Residential | 1053663.450000 | | Palm Beach | Residential | 682507.670000 | | St. Johns | Residential | 5618.410000 | | Highlands | Residential | -1792.200000 | | Seminole | Residential | -2041.840000 | | Highlands | Residential | -3248.500000 | | Miami Dade | Residential | -82673.770000 | | Miami Dade | Commercial | -200047.590000 | +------------+-------------+----------------+ Miller 5.3.0 发布,CSV 和 JSON 处理工具下载地址