MILLER(1)

NAME
miller - sed, awk, cut, join, and sort for name-indexed data such as CSV

SYNOPSIS

DESCRIPTION

Description text with backslash ampersand period. Also -- backslash dash. Also ’ for single quote. Also " for double quote. Also ' for single quote.

EXAMPLES

    Here is a code block
    Here is a code block
    Here is a code block

OPTIONS

In the following option flags, the version with "i" designates the input stream, "o" the output stream, and the version without prefix sets the option for both input and output stream. For example: --irs sets the input record separator, --ors the output record separator, and --rs sets both the input and output separator to the given value.

  SEPARATOR

--rs, --irs, --ors
    Record separators, defaulting to newline

--fs, --ifs, --ofs, --repifs
    Field separators, defaulting to ","

--ps, --ips, --ops
    Pair separators, defaulting to "="

  DATA-FORMAT

--dkvp, --idkvp, --odkvp
    Delimited key-value pairs, e.g "a=1,b=2" (default)

--nidx, --inidx, --onidx
    Implicitly-integer-indexed fields (Unix-toolkit style)

--csv, --icsv, --ocsv
    Comma-separated value (or tab-separated with --fs tab, etc.)

--pprint, --ipprint, --opprint, --right
    Pretty-printed tabular (produces no output until all input is in)

--pprint, --ipprint, --opprint, --right
    Pretty-printed tabular (produces no output until all input is in)

-p is a keystroke-saver for --nidx --fs space --repifs

  NUMERICAL FORMAT

    Sets the numerical format given a printf-style format string.

  OTHER

    Seeds the random number generator used for put/filter urand() with a number n of the form 12345678 or 0xcafefeed.

  VERBS

cut

    Usage: mlr cut [options]

    Passes through input records with specified fields included/excluded.

    -f {a,b,c}
        Field names to include for cut.

    -o
        Retain fields in the order specified here in the argument list. Default is to retain them in the order found in the input data.

    -x|--complement
        Exclude, rather that include, field names specified by -f.

filter

    prints the AST (abstract syntax tree) for the expression, which gives full transparency on the precedence and associativity rules of Miller’s grammar. Please use a dollar sign for field names and double-quotes for string literals. Miller built-in variables are NF, NR, FNR, FILENUM, FILENAME, PI, E.

    Examples:

        mlr filter 'log10($count) > 4.0'
        mlr filter 'FNR == 2          (second record in each file)'
        mlr filter 'urand() < 0.001'  (subsampling)
        mlr filter '$color != "blue" && $value > 4.2'
        mlr filter '($x<.5 && $y<.5) || ($x>.5 && $y>.5)'

    Please see http://johnkerl.org/miller/doc/reference.html for more information including function list.

AUTHOR

miller is written by John Kerl <kerl.john.r@gmail.com>.

This manual page has been composed from miller’s help output by Eric MSP Veith <eveith@veith-m.de>.

SEE ALSO

sed(1), awk(1), cut(1), join(1), sort(1), RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files, the miller website http://johnkerl.org/miller/doc