1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
/probe1.jsonl:
{"a": 123} [123]
/probe2.jsonl:
{"a": 123}
[123]
/single.jsonl:
{"a": 123}
/error.jsonl:
{"a": 123} asd
$ fq . probe1.jsonl
[
{
"a": 123
},
[
123
]
]
$ fq . probe2.jsonl
[
{
"a": 123
},
[
123
]
]
$ fq -d jsonl . single.jsonl
[
{
"a": 123
}
]
$ fq -d jsonl . error.jsonl
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: error.jsonl (jsonl)
| | | error: jsonl: error at position 0xf: invalid character 'a' looking for beginning of value
0x0|7b 22 61 22 3a 20 31 32 33 7d 20 61 73 64 0a| |{"a": 123} asd.|| gap0: raw bits
$ fq -n '[{"a":123}, [123]] | to_jsonl'
"{\"a\":123}\n[123]\n"
$ fq -n '123 | to_jsonl'
exitcode: 5
stderr:
error: to_jsonl cannot be applied to: number (123)
|