知行社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

知行社区 门户 技术 查看内容

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

2017-11-16 10:26| 发布者: oppo| 查看: 6289| 评论: 0|原作者: oppo

摘要: # cat new/abc.OK.app.cmdb.json |jq '.' [ { "故障时间": "2017", "Value": "50", "name": "cmdb", "严重性": "Info", "当前时间": "2018", "故障 ...
[zxsq-anti-bbcode-root@repo zabbix-alert]# cat new/abc.OK.app.cmdb.json |jq '.[zxsq-anti-bbcode-"数据"]'
[
  {
    "故障时间": "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



鲜花

握手

雷人

路过

鸡蛋
发表评论

最新评论

相关分类



QQ|小黑屋|手机版|知行技术社区 ( 湘ICP备11020288号-1 )

GMT+8, 2020-4-5 11:05 , Processed in 0.010576 second(s), 12 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部