Skip to content

Instantly share code, notes, and snippets.

@jclosure
Last active March 9, 2021 03:59
Show Gist options
  • Save jclosure/04f0728148c83b869bfd5f56c12ea9c8 to your computer and use it in GitHub Desktop.
Save jclosure/04f0728148c83b869bfd5f56c12ea9c8 to your computer and use it in GitHub Desktop.
portable killall based on a grep expression
# e.g. portable killall based on a grep expression
# usage: killgrep python3
$ echo "killgrep() {ps -aux | grep -i \"\$1\" | awk '{print \$2}' | xargs kill -9;}" >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment