diff --git a/bin/showports b/bin/showports new file mode 100755 index 0000000..9e58fb6 --- /dev/null +++ b/bin/showports @@ -0,0 +1,12 @@ +#!/bin/sh +if [ "$1" == "-h" ] ; then + echo "$0 [port]" + exit 1 +fi + +if [ "$1" != "" ] ; then + FILT="-iTCP:$1" +else + FILT="-iTCP" +fi +lsof -nP $FILT | grep LISTEN