curl 获取http code
###重试多次
resultCode=$( curl https://skeyndor.voyageone.com.cn/rest/api/v1/catalog/add
--connect-timeout 10 --max-time 10 --retry 5 --retry-delay 0
--retry-max-time 60 -I --stderr /dev/null
| head -1 | cut -d' ' -f2)
code=$(curl -LI http://www.example.org -o /dev/null -w '%{http_code}\n' -s) if [ code -eq '200' ] then echo 'ok' fi