Created
September 19, 2018 21:04
-
-
Save broox9/8dde981221411a9936e8eeece5267793 to your computer and use it in GitHub Desktop.
Port Check Script
This file contains hidden or 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/bash | |
| # pass a port to the script or default to 8080 | |
| x=8080 | |
| if [ $1 ]; | |
| then | |
| x=$1 | |
| fi | |
| lsof -nP -iTCP:$x | grep LISTEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment