Support Solaris

pull/260/head
neil 9 years ago
parent 85c5285534
commit 830012564d

@ -406,6 +406,9 @@ _ss() {
else else
if netstat -help 2>&1 | grep "\-p protocol" >/dev/null ; then if netstat -help 2>&1 | grep "\-p protocol" >/dev/null ; then
netstat -an -p tcp | grep LISTEN | grep ":$_port " netstat -an -p tcp | grep LISTEN | grep ":$_port "
elif netstat -help 2>&1 | grep -- '-P protocol' >/dev/null ; then
#for solaris
netstat -an -P tcp | grep ".$_port "
else else
netstat -ntpl | grep ":$_port " netstat -ntpl | grep ":$_port "
fi fi

Loading…
Cancel
Save