Browse Source
fix(cloudns): fix grep when record start with hyphen symbol
pull/4568/head
imlonghao
2 years ago
No known key found for this signature in database
GPG Key ID: BB80A757B3E37324
1 changed files with
1 additions and
1 deletions
-
dnsapi/dns_cloudns.sh
|
@ -78,7 +78,7 @@ dns_cloudns_rm() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
for i in $(echo "$response" | tr '{' "\n" | grep "$record"); do |
|
|
|
|
|
|
|
|
for i in $(echo "$response" | tr '{' "\n" | grep -- "$record"); do |
|
|
record_id=$(echo "$i" | tr ',' "\n" | grep -E '^"id"' | sed -re 's/^\"id\"\:\"([0-9]+)\"$/\1/g') |
|
|
record_id=$(echo "$i" | tr ',' "\n" | grep -E '^"id"' | sed -re 's/^\"id\"\:\"([0-9]+)\"$/\1/g') |
|
|
|
|
|
|
|
|
if [ -n "$record_id" ]; then |
|
|
if [ -n "$record_id" ]; then |
|
|