1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-30 22:17:57 +01:00
tldr/pages/common/csvsort.md
Hayden Schiff 5c3c6f9e08 typo fix
2016-01-21 18:16:56 -05:00

405 B

csvsort

Sorts CSV files. Included in csvkit.

  • Sort a CSV file by column 9:

csvsort -c {{9}} {{data.csv}}

  • Sort a CSV file by the "name" column in descending order:

csvsort -r -c {{name}} {{data.csv}}

  • Sort a CSV file by column 2, then by column 4:

csvsort -c {{2,4}} {{data.csv}}

  • Sort a CSV file without inferring data types:

csvsort --no-inference -c {{columns}} {{data.csv}}