我正在尝试使用grep在curl命令中显示Yarn组的列表。
current_group=$(curl -u "${ranger_admin}:${ranger_password}" \ "${ranger_host}/service/public/v2/api/service/${ranger_cluster}_${policyService}/policy/YARN%20${policyName}" | grep -Poz '(?:\G(?!^)",|"${groups}":\s*\[)\s*"\K[^"]+')
echo "${current_group}"
结果是:
curl: (22) The requested URL returned error: 404 Not Found
curl: (1) Protocol http not supported or disabled in libcurl
curl: (22) The requested URL returned error: 400 Bad Request
我该如何解决?