【发布时间】:2016-10-15 20:14:07
【问题描述】:
我正在使用以下 curl 命令:
curl -s -v --user admin:orca --insecure -X GET https://insecure.registry.com/api/v0/repositories/authi-api/tags
得到以下输出:
{
"name": "Dev_ReleaseRollout_Lane-3",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
},
{
"name": "Dev_ReleaseRollout_Lane-latest",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
},
{
"name": "Payments_Dev_Lane-267",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
}
我只想在变量中获取 name 值。
我只需要 Dev_ReleaseRollout_Lane-3 Dev_ReleaseRollout_Lane-latest Payments_Dev_Lane-267 在变量中
【问题讨论】:
-
到目前为止你尝试了哪些命令,它们输出了什么?
-
你得到一个数组:
[...]还是上面提到的输出?