Skip to content

Instantly share code, notes, and snippets.

@mikiyaf
Created November 13, 2017 01:22
Show Gist options
  • Select an option

  • Save mikiyaf/835b720e6260369c396b84febaee3f53 to your computer and use it in GitHub Desktop.

Select an option

Save mikiyaf/835b720e6260369c396b84febaee3f53 to your computer and use it in GitHub Desktop.
fkill - kill process
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