fix for solaris

This commit is contained in:
neil committed 2023-07-29 23:30:44 +08:00
1 parent 6db8ae451a
commit 15ee036db1
1 file changed
+9 -3
+9 -3
View File
@@ -923,11 +923,17 @@ _sed_i() {
fi
}
if [ "$(echo abc | egrep -o b 2>/dev/null)" = "b" ]; then
__USE_EGREP=1
else
__USE_EGREP=""
fi
_egrep_o() {
if _is_solaris; then
sed -n 's/.*\('"$1"'\).*/\1/p'
else
if [ "$__USE_EGREP" ]; then
egrep -o "$1"
else
sed -n 's/.*\('"$1"'\).*/\1/p'
fi
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.