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
e35ef759
Commit
e35ef759
authored
Nov 23, 2020
by
Easton Man
Browse files
fix: fix solaris sed and grep issue
parent
5d0657c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_huaweicloud.sh
View file @
e35ef759
...
...
@@ -144,7 +144,7 @@ _add_record() {
response
=
$(
_get
"
${
dns_api
}
/v2/zones/
${
zoneid
}
/recordsets?name=
${
_domain
}
"
)
_debug
"
${
response
}
"
_exist_record
=
$(
echo
"
${
response
}
"
|
sed
':a;
N;$!ba;s/\n/ /g'
|
grep
-
o
'"records":[^]]*'
|
sed
's/\"records\"\:\[//g'
)
_exist_record
=
$(
echo
"
${
response
}
"
|
sed
-e
':a'
-e
'
N;$!ba;
'
-e
'
s/\n/ /g'
|
_e
grep
_
o
'"records":[^]]*'
|
sed
's/\"records\"\:\[//g'
)
_debug
"
${
_exist_record
}
"
# 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