From eac77bf0ecf5de3e97fd6d61d8f24233fe509ca4 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 13 Sep 2015 18:39:40 -0700 Subject: [PATCH] UT cases for CSV formattting options --- doc/reference.html | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/reference.html b/doc/reference.html index 56a820d7d..24993b55b 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -249,19 +249,22 @@ Data-format options, for input, output, or both: --xtab --ixtab --oxtab Pretty-printed vertical-tabular -p is a keystroke-saver for --nidx --fs space --repifs Separator options, for input, output, or both: - --rs --irs --ors Record separators, defaulting to newline - --fs --ifs --ofs --repifs Field separators, defaulting to "," - --ps --ips --ops Pair separators, defaulting to "=" - Notes (as of Miller v2.0.0): - * RS/FS/PS are used for DKVP, NIDX, and CSVLITE formats where they must be single-character. - * For CSV, PPRINT, and XTAB formats, RS/FS/PS command-line options are ignored. + --rs --irs --ors Record separators, e.g. newline + --fs --ifs --ofs --repifs Field separators, e.g. comma + --ps --ips --ops Pair separators, e.g. equals sign + Notes (as of Miller v2.1.4): + * IRS,IFS,IPS,ORS,OFS,OPS are specifiable for all file formats. + * IRS,IFS,IPS may be multi-character for CSV; they must be single-character for other formats. + The latter restriction will be lifted in a near-future release. + * ORS,OFS,OPS may be multi-character for all formats. * DKVP, NIDX, CSVLITE, PPRINT, and XTAB formats are intended to handle platform-native text data. - In particular, this means LF line-terminators on Linux/OSX. + In particular, this means LF line-terminators by default on Linux/OSX. * CSV is intended to handle RFC-4180-compliant data. - In particular, this means it *only* handles CRLF line-terminators. - * This will change in v2.1.0, at which point there will be a (default-off) LF-termination option - for CSV, multi-char RS/FS/PS, and double-quote support for DKVP. -Double-quoting for CSV: + In particular, this means it uses CRLF line-terminators by default. + So, you can use "--csv --rs lf" for Linux-native CSV files. + * You can use "--fs '|'", "--ips :", etc., or any of the following names for separators: + cr crcr lf lflf crlf crlfcrlf tab space comma newline pipe slash colon semicolon equals +Double-quoting for CSV output: --quote-all Wrap all fields in double quotes --quote-none Do not wrap any fields in double quotes, even if they have OFS or ORS in them --quote-minimal Wrap fields in double quotes only if they have OFS or ORS in them