fix extracting the id from the get response during record deletion
This commit is contained in:
parent
d3644d9856
commit
e8ddae45c3
@ -120,7 +120,7 @@ dns_cf_rm() {
|
|||||||
if [ "$count" = "0" ]; then
|
if [ "$count" = "0" ]; then
|
||||||
_info "Don't need to remove."
|
_info "Don't need to remove."
|
||||||
else
|
else
|
||||||
record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | head -n 1)
|
record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\ \"[^\"]*\"" | cut -d : -f 2 | tr -d \" | head -n 1)
|
||||||
_debug "record_id" "$record_id"
|
_debug "record_id" "$record_id"
|
||||||
if [ -z "$record_id" ]; then
|
if [ -z "$record_id" ]; then
|
||||||
_err "Can not get record id to remove."
|
_err "Can not get record id to remove."
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user