Commit 15ee036d authored by neil's avatar neil
Browse files

fix for solaris

parent 6db8ae45
...@@ -923,11 +923,17 @@ _sed_i() { ...@@ -923,11 +923,17 @@ _sed_i() {
fi fi
} }
if [ "$(echo abc | egrep -o b 2>/dev/null)" = "b" ]; then
__USE_EGREP=1
else
__USE_EGREP=""
fi
_egrep_o() { _egrep_o() {
if _is_solaris; then if [ "$__USE_EGREP" ]; then
sed -n 's/.*\('"$1"'\).*/\1/p'
else
egrep -o "$1" egrep -o "$1"
else
sed -n 's/.*\('"$1"'\).*/\1/p'
fi fi
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment