Questions tagged [miller]

Questions about the `mlr` ("Miller") name-indexed data processing tool.

Filter by
Sorted by
Tagged with
1
vote
2answers
46 views

How could I (painlessly) split or reverse “Last, First” within a record in Miller?

I have a tab-delimited file where one of the columns is in the format "LastName, FirstName". What I want to do is split that record out into two separate columns, last, and first, use cut or some ...
2
votes
1answer
68 views

How can I call an external command from within Miller (mlr)’s DSL?

Suppose I have the following CSV: $ cat test.csv id,domain 1,foo.com 2,bar.com Using mlr put, I can easily map any function over a field in the CSV, as long as I can define it in the Miller DSL. So, ...
3
votes
2answers
82 views

Output a header label in data field in miller

Given file.csv: a,b,c 1,2,3 How can mlr be made to output: a,b,c 1,2,c Using the label name of $c without knowing in advance that $c contains the letter "c"? Note: correct answer must use mlr ...