1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/packages/scripts/fkill.sh
2020-04-09 19:30:25 +02:00

13 lines
246 B
Bash
Executable File

#!/usr/bin/env bash
if [ "$UID" != "0" ]; then
pid=$(ps -f -u "$UID" | sed 1d | fzf -m | awk '{print $2}')
else
pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
fi
if [ "x$pid" != "x" ]
then
echo "$pid" | xargs kill "-${1:-9}"
fi