Created
February 16, 2024 18:56
-
-
Save pfrozi/8b703b11c3db92f7e01030175a0cd76b to your computer and use it in GitHub Desktop.
Kill all processes with specific name
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/sh | |
# Call: killall forti | |
# | |
# Kill all process that contains the arg1 text | |
for p in `pgrep ${$1}`; | |
do echo "PID forti: ${p} Killing..." && kill $p && echo "${p} killed\!" ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment