欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

jq 命令解析报错

程序员文章站 2022-07-12 15:06:12
...
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 232, column 2

因为你的json里有啥不可见的乱七八糟的符号:http://rosettacode.org/wiki/Strip_control_codes_and_extended_characters_from_a_string#jq

cat tmp|awk '{print $9}'|jq -R 'fromjson?|select(type == "object")'|jq '.liveid,.text' > tmp2

用这个jq -R 'fromjson?|select(type == "object")'过滤一下会很nice。

 

 

相关标签: 一句话