mirror of
https://github.com/wader/fq.git
synced 2024-12-21 04:11:55 +03:00
cae288e6be
json, yaml, toml, xml, html, csv are now normal formats and most of them also particiate in probing (not html and csv). Also fixes a bunch of bugs in to/fromxml, to/fromjq etc.
48 lines
548 B
Plaintext
48 lines
548 B
Plaintext
/test:
|
|
1,2,3
|
|
$ fq -d csv . /test
|
|
[
|
|
[
|
|
"1",
|
|
"2",
|
|
"3"
|
|
]
|
|
]
|
|
$ fq -i
|
|
null> "a,b,c,d" | fromcsv | ., tocsv
|
|
[
|
|
[
|
|
"a",
|
|
"b",
|
|
"c",
|
|
"d"
|
|
]
|
|
]
|
|
"a,b,c,d\n"
|
|
null> "a,\"b, c\",d" | fromcsv | ., tocsv
|
|
[
|
|
[
|
|
"a",
|
|
"b, c",
|
|
"d"
|
|
]
|
|
]
|
|
"a,\"b, c\",d\n"
|
|
null> "a\t\"b\t c\"\td" | fromcsv({comma:"\t"}) | ., tocsv({comma: "\t"})
|
|
[
|
|
[
|
|
"a",
|
|
"b\t c",
|
|
"d"
|
|
]
|
|
]
|
|
"a\t\"b\t c\"\td\n"
|
|
null> [[bsl(1;100)]] | tocsv | ., fromcsv
|
|
"1267650600228229401496703205376\n"
|
|
[
|
|
[
|
|
"1267650600228229401496703205376"
|
|
]
|
|
]
|
|
null> ^D
|