Created
November 13, 2017 01:22
-
-
Save mikiyaf/835b720e6260369c396b84febaee3f53 to your computer and use it in GitHub Desktop.
fkill - kill process
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
| fkill() { | |
| local pid | |
| pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') | |
| if [ "x$pid" != "x" ] | |
| then | |
| echo $pid | xargs kill -${1:-9} | |
| fi | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment