Last active
March 9, 2021 03:59
-
-
Save jclosure/04f0728148c83b869bfd5f56c12ea9c8 to your computer and use it in GitHub Desktop.
portable killall based on a grep expression
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
# 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