Created
November 6, 2019 16:24
-
-
Save danielres/d8a9d031b48fe8b400d8aaa2fe8fbdf5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Finds a process by regexp then terminates | |
# it, including all subprocesses | |
# usage: ./terminate <PROCESS_NAME_OR_PATTERN> | |
kill -TERM -- -$(pgrep -f "$1") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment