pull/4935/merge
猫咪恐慌 2 weeks ago committed by GitHub
commit ffbc2ab827
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -928,7 +928,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=""
@ -936,7 +936,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…
Cancel
Save