From 4746a7342c194b683aaaad1ba0adc043ad99719c Mon Sep 17 00:00:00 2001 From: Hayden Schiff Date: Thu, 21 Jan 2016 18:04:19 -0500 Subject: [PATCH] added csvsort --- pages/common/csvsort.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/csvsort.md diff --git a/pages/common/csvsort.md b/pages/common/csvsort.md new file mode 100644 index 000000000..81cb649c5 --- /dev/null +++ b/pages/common/csvsort.md @@ -0,0 +1,20 @@ +# 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 columns 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}}`