JQ命令使用说明

#安装
https://centos.pkgs.org/7/epel-x86_64/jq-1.6-2.el7.x86_64.rpm.html
https://centos.pkgs.org/7/epel-x86_64/oniguruma-6.8.2-1.el7.x86_64.rpm.html
yum install oniguruma-6.8.2-1.el7.x86_64.rpm jq-1.6-2.el7.x86_64.rpm
#测试
echo '{"fruit":{"name":"apple","color":"green","price":1.20}}' | jq '.'
curl http://api.open-notify.org/iss-now.json | jq '.'
echo '{"fruit":{"name":"apple","color":"green","price":1.20}}' | jq '[.fruit.name,.fruit.color]'
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注