瀏覽代碼

added csvformat

Hayden Schiff 9 年之前
父節點
當前提交
7f5bc2fec7
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      pages/common/csvformat.md

+ 24 - 0
pages/common/csvformat.md

@@ -0,0 +1,24 @@
+# csvformat
+
+> Convert a CSV file to a custom output format.
+> Included in csvkit.
+
+- Convert to a tab-delimited file:
+
+`csvformat -T {{data.csv}}`
+
+- Convert delimiters to a custom character:
+
+`csvformat -D "{{custom_character}}" {{data.csv}}`
+
+- Convert line endings to carriage return + line feed:
+
+`csvformat -M "{{\r\n}}" {{data.csv}}`
+
+- Convert to minimal use of quote characters:
+
+`csvformat -U 0 {{data.csv}}`
+
+- Convert to maximum use of quote characters:
+
+`csvformat -U 1 {{data.csv}}`