Skip to content

Instantly share code, notes, and snippets.

@FrankFang
Last active April 8, 2018 10:31
Show Gist options
  • Save FrankFang/022e8c422b61859084eecaa945fe473d to your computer and use it in GitHub Desktop.
Save FrankFang/022e8c422b61859084eecaa945fe473d to your computer and use it in GitHub Desktop.
checkport() {
if [ -z "$1" ]; then
echo 'checkport portNumber'
else
sudo lsof -i -P -n | grep "$1"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment