Search code examples
command-linemiller

How to delete blank rows in csv files using the Miller command line tool?


I have a csv file (on Mac) with many blank rows.

I am using the Miller command-line tool for other processes and would like to remove blank rows also using that tool.

I can't find anything in the docs so far, but it is quite extensive so I may have overlooked it somewhere.


Solution

  • The verb is skip-trivial-records:

    mlr --csv skip-trivial-records input.csv >output.csv