Last active
June 24, 2020 19:53
-
-
Save tubaman/c0eda7b85343b805f575b8fa3be024be to your computer and use it in GitHub Desktop.
Linux CLI to kill a process using pgrep arguments as nicely but surely as possible
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 | |
# uses surekillpid: https://gist.github.com/tubaman/377458a11fedb49cc2132ea6e31ae8b2 | |
pgrep $@ | grep -v $$ | xargs --no-run-if-empty surekillpid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment