欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

查看: 7158|回复: 0
收起左侧

jq打印包含特殊字符的字段

[复制链接]
oppo 发表于 2017-11-13 14:34 | 显示全部楼层 |阅读模式
 复制代码 隐藏代码
[root@repo zabbix-alert]# cat new/abc.OK.app.cmdb.json |jq '.["数据"]' [   {     "故障时间": "2017",     "Value": "50",     "name": "cmdb",     "严重性": "Info",     "当前时间": "2018",     "故障时长": "<span style=\"color:red; font-weight:bold;\">111</span>",     "监控项": "disk"   },   {     "故障时间": "2017",     "Value": "50",     "name": "cmdb",     "严重性": "Info",     "当前时间": "2018",     "故障时长": "<span style=\"color:red; font-weight:bold;\">111</span>",     "监控项": "disk"   } ]

参考资料: https://github.com/stedolan/jq/issues/140

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

客服QQ936487697|联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2025-4-28 20:22 , Processed in 0.096668 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表