jq 能否在字段之间产生没有换行符的输出,每条记录一行?
Can jq produce output without newlines between fields, one line per record?
jq 始终在每个字段之间生成带有 newlines/returns 的输出:
jq ... foo.json
{
"Name": "stedolan",
"RecordTimestamp": "2021-02-25T05:00:06.740+0000"
}
如何使每条记录输出一行,使其看起来像:
{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}
jq 有一个选项:--compact-output
jq --compact-output ... foo.json
{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}
jq 始终在每个字段之间生成带有 newlines/returns 的输出:
jq ... foo.json
{
"Name": "stedolan",
"RecordTimestamp": "2021-02-25T05:00:06.740+0000"
}
如何使每条记录输出一行,使其看起来像:
{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}
jq 有一个选项:--compact-output
jq --compact-output ... foo.json
{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}