mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-16 19:22:44 +00:00
fix: egrep warning.
egrep is obsolescent, using grep -E.
This commit is contained in:
parent
d8e2b96bce
commit
30f1bae542
4
acme.sh
4
acme.sh
@ -923,7 +923,7 @@ _sed_i() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$(echo abc | egrep -o b 2>/dev/null)" = "b" ]; then
|
if [ "$(echo abc | grep -E -o b 2>/dev/null)" = "b" ]; then
|
||||||
__USE_EGREP=1
|
__USE_EGREP=1
|
||||||
else
|
else
|
||||||
__USE_EGREP=""
|
__USE_EGREP=""
|
||||||
@ -931,7 +931,7 @@ fi
|
|||||||
|
|
||||||
_egrep_o() {
|
_egrep_o() {
|
||||||
if [ "$__USE_EGREP" ]; then
|
if [ "$__USE_EGREP" ]; then
|
||||||
egrep -o -- "$1" 2>/dev/null
|
grep -E -o -- "$1" 2>/dev/null
|
||||||
else
|
else
|
||||||
sed -n 's/.*\('"$1"'\).*/\1/p'
|
sed -n 's/.*\('"$1"'\).*/\1/p'
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user