Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
fd511966
Commit
fd511966
authored
Nov 24, 2020
by
Easton Man
Browse files
fix: revert adding tr to replace sed
parent
c4ddddd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_huaweicloud.sh
View file @
fd511966
...
@@ -148,7 +148,7 @@ _add_record() {
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment