Created
May 22, 2019 08:33
-
-
Save ticklemynausea/9b799aa96f2995a66a9c45135f1d543c 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/bash | |
for port in $@ | |
do | |
for pid in $(lsof -iTCP:$port | awk '{print $2}' | tail -n +2) | |
do | |
echo $port: $pid | |
kill -9 $pid | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment