Created
July 19, 2016 12:36
-
-
Save yoshuawuyts/31a1e863194a237e76afcc8b9fdcf4da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#/ Usage: ports [<options>] | |
#/ Show processes listening on ports. | |
#/ Any <options> are passed to lsof | |
set -e | |
test "$1" = "--help" && { | |
grep ^#/ <"$0"| cut -c4- | |
exit 2 | |
} | |
exec lsof -iTCP -sTCP:LISTEN -P "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment