mlr
all
Miller is like `awk`, `sed`, `cut`, `join`, and `sort` for name-indexed data such as CSV, TSV, and tabular JSON.
More info →Options (2)
-c, --csvbooleanFilter lines of a compressed CSV file treating numbers as [S]trings
Example:
mlr --prepipe 'gunzip' {{[-c|--csv]}} filter {{[-S|--infer-none]}} '${{fieldName}} =~ "{{regex}}"' {{example.csv.gz}}-S, --infer-nonebooleanFilter lines of a compressed CSV file treating numbers as [S]trings
Example:
mlr --prepipe 'gunzip' {{[-c|--csv]}} filter {{[-S|--infer-none]}} '${{fieldName}} =~ "{{regex}}"' {{example.csv.gz}}Examples (7)
Convert CSV to JSON, performing calculations, and display those calculations
mlr --icsv --ojson put '$newField1 = $oldFieldA/$oldFieldB' example.csvReceive JSON and format the output as vertical JSON
Filter lines of a compressed CSV file treating numbers as [S]trings
mlr --prepipe 'gunzip' [-c|--csv] filter [-S|--infer-none] '$fieldName =~ "regex"' example.csv.gzmade by @shridhargupta | data from tldr-pages