compatible for windows netstat tool

This commit is contained in:
neil committed 2016-03-23 20:23:56 +08:00
1 parent d3d884c16f
commit ccb965359c
1 file changed
+6 -1
+6 -1
View File
@@ -183,7 +183,12 @@ _ss() {
_port="$1"
if command -v "netstat" >/dev/null 2>&1 ; then
_debug "Using: netstat"
netstat -ntpl | grep :$_port" "
if netstat -h 2>&1 | grep "\-p proto" >/dev/null ; then
#for windows version netstat tool
netstat -nb -p tcp | grep :$_port" "
else
netstat -ntpl | grep :$_port" "
fi
return 0
fi
if command -v "ss" >/dev/null 2>&1 ; then
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.