jq 命令解析报错

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。

 

 

你可能感兴趣的:(一句话)