标签:max store location nfs www res bin 屏蔽 输出
#!/bin/bash
status_code=curl -I -m 10 -o /dev/null -s -w %{http_code} www.baidu.com
#!/bin/bash
status_code=$(curl -H "Content-Type: application/json" -o /dev/null -s -w %{htt
p_code} -XPUT -d ‘
{
"type": "fs",
"settings": {
"location": "‘${NFS_DIR}‘/‘${REPO_DIR}‘",
"max_snapshot_bytes_per_sec": "50mb",
"max_restore_bytes_per_sec": "50mb"
}
}‘ ${ES_URL}/_snapshot/${REPO_DIR})
标签:max store location nfs www res bin 屏蔽 输出
原文地址:https://www.cnblogs.com/zendwang/p/shell-curl-return-http-status-code.html