Created
December 5, 2022 13:30
-
-
Save nicolasdanelon/d75f6c17ffa2796d5e7bf75f3b6ac44e to your computer and use it in GitHub Desktop.
Dead simple script for kill processes (firebase emulators) by port, blazingly fast
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 i in 9001 8086 8081 | |
do | |
lsof -i tcp:$i | head -n 2 | tail -n 1 | awk '{print $2}' | xargs kill | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment