README - csvtofsv - Convert CSV to FSV (`fs' (0x1c) as FS and `rs' (0x1e) as RS) | |
hg clone https://bitbucket.org/iamleot/csvtofsv | |
Log | |
Files | |
Refs | |
README | |
--- | |
README | |
--- | |
1 csvtofsv reads a CSV from standard input and converts it to a FSV with a | |
2 `fs` ASCII character (034 in octal, 28 in decimal, 0x1c in hexadecimal) | |
3 as field separator and `rs` ASCII character (036 in octal, 30 in | |
4 decimal, 0x1e in hexadecimal) as record separator. | |
5 | |
6 All `\r` are ignored and all quotes are removed from the quoted fields. | |
7 | |
8 The CSV parsing tries to follow as much as possible RFC 4180 [1]. | |
9 | |
10 | |
11 csvtofsv output can be processed via AWK by setting FS and RS as follows: | |
12 | |
13 % awk 'BEGIN { FS = "\034"; RS = "\036" } { ... }' | |
14 | |
15 | |
16 References | |
17 | |
18 [1] Shafranovich, Y., "Common Format and MIME Type for Comma-Separated | |
19 Values (CSV) Files", RFC 4180, October 2005 |