Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
f72a4f96
Unverified
Commit
f72a4f96
authored
Oct 03, 2021
by
neil
Committed by
GitHub
Oct 03, 2021
Browse files
Merge pull request #3664 from shadowlmd/fix-grep-dns-he
Fix grep options processing in dns_he module
parents
84fe6654
83cb89e4
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_he.sh
View file @
f72a4f96
...
@@ -85,7 +85,7 @@ dns_he_rm() {
...
@@ -85,7 +85,7 @@ dns_he_rm() {
_debug
"The txt record is not found, just skip"
_debug
"The txt record is not found, just skip"
return
0
return
0
fi
fi
_record_id
=
"
$(
echo
"
$response
"
|
tr
-d
"#"
|
sed
"s/<tr/#<tr/g"
|
tr
-d
"
\n
"
|
tr
"#"
"
\n
"
|
grep
"
$_full_domain
"
|
grep
'"dns_tr"'
|
grep
"
$_txt_value
"
|
cut
-d
'"'
-f
4
)
"
_record_id
=
"
$(
echo
"
$response
"
|
tr
-d
"#"
|
sed
"s/<tr/#<tr/g"
|
tr
-d
"
\n
"
|
tr
"#"
"
\n
"
|
grep
"
$_full_domain
"
|
grep
'"dns_tr"'
|
grep
--
"
$_txt_value
"
|
cut
-d
'"'
-f
4
)
"
_debug2 _record_id
"
$_record_id
"
_debug2 _record_id
"
$_record_id
"
if
[
-z
"
$_record_id
"
]
;
then
if
[
-z
"
$_record_id
"
]
;
then
_err
"Can not find record id"
_err
"Can not find record id"
...
...
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