Skip to content

Instantly share code, notes, and snippets.

@broox9
Created September 19, 2018 21:04
Show Gist options
  • Select an option

  • Save broox9/8dde981221411a9936e8eeece5267793 to your computer and use it in GitHub Desktop.

Select an option

Save broox9/8dde981221411a9936e8eeece5267793 to your computer and use it in GitHub Desktop.
Port Check Script
#!/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