Browse Source

fix: revert adding tr to replace sed

Easton Man 5 years ago
parent
commit
fd511966a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dnsapi/dns_huaweicloud.sh

+ 1 - 1
dnsapi/dns_huaweicloud.sh

@@ -148,7 +148,7 @@ _add_record() {
   response=$(_get "${dns_api}/v2/zones/${zoneid}/recordsets?name=${_domain}")
 
   _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}"
 
   # Check if record exist