Skip to content

Regex support, gsub, reservoir sampling, iterative stats, and other features

Compare
Choose a tag to compare
@johnkerl johnkerl released this 17 Oct 23:05
· 7945 commits to main since this release

Regex support

gsub function

In addition to the existing sub function: replace-all in addition to replace-once. Includes regex support.
http://johnkerl.org/miller/doc/reference.html#Functions_for_filter_and_put

Reservoir sampling

http://johnkerl.org/miller/doc/reference.html#sample

Iterative stats1/stats2

Use mlr stats1 -s ... or mlr stats2 -s ... to print averages, min/max, correlation, etc. on every record. Useful in tail -f contexts when you want to see statistics evolving as the data evolve in time.

http://johnkerl.org/miller/doc/reference.html#stats1
http://johnkerl.org/miller/doc/reference.html#stats2

Minor

  • Initial delta for mlr step -a delta is now 0, matching initial 1 for mlr step -a ratio
  • Usage messages consistently go to stdout when asked for via -h, and stderr in case of command-line syntax errors
  • Online help is confined to 80-character column width, except for mlr -f which is all single-line greppable
  • Header/data length mismatch error messages for CSV/CSV-lite now include file/line context