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
0d4035e9
Commit
0d4035e9
authored
Dec 03, 2016
by
Stefan Seidel
Browse files
remove fgrep, escape regex chars instead
parent
88ed5e50
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_do.sh
View file @
0d4035e9
...
...
@@ -67,7 +67,7 @@ _dns_do_list_rrs() {
_rr_list
=
"
$(
echo
"
${
response
}
"
\
|
tr
-d
"
\n\r\t
"
\
|
sed
-e
's/<item xsi:type="ns2:Map">/\n/g'
\
|
f
grep
">
$
{
fulldomain
}
</value>"
\
|
grep
">
$
(
_regexcape
"
$
fulldomain
"
)
</value>"
\
|
sed
-e
's/<\/item>/\n/g'
\
|
grep
'>id</key><value'
\
| _egrep_o
'>[0-9]{1,16}<'
\
...
...
@@ -127,7 +127,7 @@ _get_root() {
return
1
fi
if
f
grep
-q
"
$
h
"
"
${
_all_domains
}
"
;
then
if
grep
-q
"
$
(
_regexcape
"
$h
"
)
"
"
${
_all_domains
}
"
;
then
_domain
=
"
$h
"
return
0
fi
...
...
@@ -138,3 +138,7 @@ _get_root() {
return
1
}
_regexcape
()
{
echo
"
$1
"
|
sed
-e
's/\([]\.$*^[]\)/\\\1/g'
}
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