13 lines
352 B
Bash
Executable File
13 lines
352 B
Bash
Executable File
### PROCESS
|
|
# mnemonic: [K]ill [P]rocess
|
|
# show output of "ps -ef", use [tab] to select one or multiple entries
|
|
# press [enter] to kill selected processes.
|
|
# press [escape] to exit.
|
|
|
|
pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[kill:process]'" | awk '{print $2}')
|
|
|
|
if [ "x$pid" != "x" ]
|
|
then
|
|
echo $pid | xargs kill -${1:-9}
|
|
fi
|