Forrest logo
back to context overview

mlr

List of commands for mlr:

  • mlr:tldr:2f08d mlr: Convert CSV to JSON, performing calculations and display those calculations.
    $ mlr --icsv --ojson put '$${newField1} = $${oldFieldA}/$${oldFieldB}' ${example-csv}
    try on your machine
    explain this command
  • mlr:tldr:70dec mlr: Sort in descending numerical order on a field.
    $ mlr --icsv --opprint sort -nr ${field} ${example-csv}
    try on your machine
    explain this command
  • mlr:tldr:8d85c mlr: Receive JSON and format the output as vertical JSON.
    $ echo '{"hello":"world", "foo":"bar"}' | mlr --ijson --ojson --jvstack cat
    try on your machine
    explain this command
  • mlr:tldr:b34c3 mlr: Sort alphabetically on a field.
    $ mlr --icsv --opprint sort -f ${field} ${example-csv}
    try on your machine
    explain this command
  • mlr:tldr:b88a4 mlr: Receive JSON data and pretty print the output.
    $ echo '{"hello":"world"}' | mlr --ijson --opprint cat
    try on your machine
    explain this command
  • mlr:tldr:ead79 mlr: Filter lines of a compressed CSV file treating numbers as strings.
    $ mlr --prepipe 'gunzip' --csv filter -S '$${fieldName} =~ "${regular_expression}"' ${example-csv-gz}
    try on your machine
    explain this command
  • mlr:tldr:f9569 mlr: Pretty-print a CSV file in a tabular format.
    $ mlr --icsv --opprint cat ${example-csv}
    try on your machine
    explain this command
back to context overview