linux 解析json
2021-06-16 01:02
标签:epel源 linux yum pen redis [1] log repos inux epel源 yum install jq ====================== [root@mhc NaHan-master]# curl 127.0.0.1:5000/v2/_catalog|jq . [root@mhc NaHan-master]# curl 127.0.0.1:5000/v2/_catalog|jq .repositories linux 解析json 标签:epel源 linux yum pen redis [1] log repos inux 原文地址:http://www.cnblogs.com/mhc-fly/p/7273408.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36 100 36 0 0 9922 0 --:--:-- --:--:-- --:--:-- 12000
{
"repositories": [
"consul",
"redis"
]
}
======================================
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36 100 36 0 0 11892 0 --:--:-- --:--:-- --:--:-- 18000
[
"consul",
"redis"
]
[root@mhc NaHan-master]# curl 127.0.0.1:5000/v2/_catalog|jq .repositories
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36 100 36 0 0 4063 0 --:--:-- --:--:-- --:--:-- 4500
[
"consul",
"redis"
]
[root@mhc NaHan-master]# curl 127.0.0.1:5000/v2/_catalog|jq .repositories[0]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36 100 36 0 0 12092 0 --:--:-- --:--:-- --:--:-- 18000
"consul"
[root@mhc NaHan-master]# curl 127.0.0.1:5000/v2/_catalog|jq .repositories[1]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36 100 36 0 0 10332 0 --:--:-- --:--:-- --:--:-- 12000
"redis"