Miller 5.2.0 已发布,Miller 是一个类似 sed、awk、cut、join 和 sort 工具,用来处理基于命名索引的数据,如 CSV、TSV 和 tabular JSON 。
该版本包括功能、文档上的改进,并修复了当使用 --c2j 等指定 I / O 格式时,CRLF line-endings 没有被正确的自动检测的问题,以及整数除以零导致的致命运行时异常问题。
效果示例:
before[code]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[/code]after[code]$ 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 |
+------------+-------------+----------------+[/code]软件详情:https://github.com/johnkerl/miller/releases/tag/v5.2.0
下载地址:https://github.com/johnkerl/miller/releases/download/v5.2.0/mlr-5.2.0.tar.gz
来自:开源中国社区

