Files
dotfiles/bin/showports
2024-07-07 14:49:24 +01:00

13 lines
160 B
Bash
Executable File

#!/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