# miller

Published articles for miller.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Miller: Command-Line Data Processing for CSV, TSV, JSON, and JSON Lines

DevFeed: [Miller: Command-Line Data Processing for CSV, TSV, JSON, and JSON Lines](<https://devfeed.tech/articles/miller-a-swiss-army-chainsaw-for-csv-data-data-science-and-data-munging-28153.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/data_science/2022/05/13/miller-a-swiss-army-chainsaw-for-csv-data-data-science-and-data-munging.html>)

Author: Fuzzygroup

Published: 2022-05-13T16:54:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [CSV](<https://devfeed.tech/topics/csv.md>), [Data Science](<https://devfeed.tech/topics/data-science.md>), [Scripting](<https://devfeed.tech/topics/scripting.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [command-line](<https://devfeed.tech/tags/command-line.md>), [commands](<https://devfeed.tech/tags/commands.md>), [csv](<https://devfeed.tech/tags/csv.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [json](<https://devfeed.tech/tags/json.md>), [miller](<https://devfeed.tech/tags/miller.md>), [perl](<https://devfeed.tech/tags/perl.md>), [python](<https://devfeed.tech/tags/python.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

### AI overview

A practical tutorial introducing Miller, a command-line tool for querying, shaping, and reformatting CSV, TSV, JSON, and JSON Lines data. It covers installation, command structure, help commands, output redirection, and examples such as listing and selecting lines from CSV files.

### Source excerpt

Every so often I run into a tool which just impresses me. This time it is Miller. And when I find such a tool, I write up a blog post to firm up my learnings. Here is the official description: Miller is a command-line tool for querying, shaping, and reformatting data files in various formats including CSV, TSV, JSON, and JSON Lines. The people that know me know that I've spent literal man years working with textual data, often CSV format - I first got started at this using Awk, specifically the NTERGAID version of Awk called HyperAwk and then I've done the Perl dance, spent time in the bowels of the abyss that is Sed, PHP, Python and Ruby. A lot of the ad hoc scripting I've written over the years can be accomplished via Miller and that is a lovely change. Just as a note, Miller's docs are really quite excellent and it is a sophisticated tool. This blog post really only touches a bit on what Miller is capable of. If you don't find what you are looking here then hit the docs. Installation I'm on a Mac so all this took was: brew install miller To confirm this works, just type: mlr --version and you should get back something like 6.x.y. I got: mlr 6.2.0 General Command Structure and Operation Miller is a command line tool that operates with commands like this: mlr --csv sort -f name input.csv Basically the syntax amounts to: input type command verb (sort in this case) option flag input source Getting Help The -help flag gives you help: mlr --help Usage: mlr [flags] {verb} [verb-dependent options ...] {zero or more file names} If zero file names are provided, standard input is read, e.g. mlr --csv sort -f shape example.csv Output of one verb may be chained as input to another using "then", e.g. mlr --csv stats1 -a min,mean,max -f quantity then sort -f color example.csv Please see 'mlr help topics' for more information. Please also see https://miller.readthedocs.io The mlr help topics command is quite informative: mlr help topics Type 'mlr help {topic}' for any of the fol