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
a3c0c754
Commit
a3c0c754
authored
Nov 18, 2016
by
neilpang
Browse files
fix egrep performance
parent
44483dba
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
a3c0c754
...
@@ -349,10 +349,8 @@ _sed_i() {
...
@@ -349,10 +349,8 @@ _sed_i() {
}
}
_egrep_o
()
{
_egrep_o
()
{
if
_contains
"
$(
egrep
-o
2>&1
)
"
"egrep: illegal option -- o"
;
then
if
!
egrep
-o
"
$1
"
2>/dev/null
;
then
sed
-n
's/.*\('
"
$1
"
'\).*/\1/p'
sed
-n
's/.*\('
"
$1
"
'\).*/\1/p'
else
egrep
-o
"
$1
"
fi
fi
}
}
...
...
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