fix: revert adding tr to replace sed

This commit is contained in:
Easton Man 2020-11-24 12:58:16 +08:00
parent c4ddddd434
commit fd511966a7

View File

@ -148,7 +148,7 @@ _add_record() {
response=$(_get "${dns_api}/v2/zones/${zoneid}/recordsets?name=${_domain}") response=$(_get "${dns_api}/v2/zones/${zoneid}/recordsets?name=${_domain}")
_debug2 "${response}" _debug2 "${response}"
_exist_record=$(echo "${response}" | tr -d "\\r\\n" | _egrep_o '"records":[^]]*' | sed 's/\"records\"\:\[//g') _exist_record=$(echo "${response}" | _egrep_o '"records":[^]]*' | sed 's/\"records\"\:\[//g')
_debug "${_exist_record}" _debug "${_exist_record}"
# Check if record exist # Check if record exist