Skip to content

Instantly share code, notes, and snippets.

@acdcjunior
Created March 5, 2024 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdcjunior/9c2c92540423482ea79f12b7c8ec9857 to your computer and use it in GitHub Desktop.
Save acdcjunior/9c2c92540423482ea79f12b7c8ec9857 to your computer and use it in GitHub Desktop.
killer() {
echo "Will now kill '$1'..."
for p in $(ps aux | grep "$1" | grep -v grep | awk '{print $2}'); do
echo "killing $p"
kill -9 $p || true
done
echo "Done killing '$1'."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment